Skip to content

Commit

Permalink
Prod gcp -> Main (#522)
Browse files Browse the repository at this point in the history
* Added the port (#244) (#245)

Co-authored-by: Fernando Sanchez <[email protected]>

Co-authored-by: Fernando Sanchez <[email protected]>

* Nginx change (#329) (#330)

Co-authored-by: Fernando Sanchez <[email protected]>

Co-authored-by: Fernando Sanchez <[email protected]>

* fix latest tag

* Main -> Staging (#500)

fix payload for removing users  (#498)

fix payload

Co-authored-by: German Urrustarazú <[email protected]>

* hide react-query icon

* only set  to  in DEV and TEST environments

* adds migration to increase vote message max length

* fix migration order

* remove duplicate flag.Bool call

* only call flag.Bool('ipfs-override') once

* change votes.message column to TEXT instead of VARCHAR

Co-authored-by: FerSanchez <[email protected]>
Co-authored-by: David Slone <[email protected]>
Co-authored-by: Fernando Sanchez <[email protected]>
Co-authored-by: Fernando Sanchez <[email protected]>
Co-authored-by: German Urrustarazú <[email protected]>
Co-authored-by: German Urrustarazu <[email protected]>
Co-authored-by: jacksonfoley <[email protected]>
Co-authored-by: Jonathan Bluks <[email protected]>
  • Loading branch information
9 people authored Sep 21, 2022
1 parent 6296037 commit ac6760a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
11 changes: 10 additions & 1 deletion backend/main/server/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ func (a *App) Initialize() {

// when running "make proposals" sets db to dev not test
arg := flag.String("db", "", "database type")
flag.Bool("ipfs-override", true, "overrides ipfs call")
flag.Int("port", 5001, "port")
flag.Int("amount", 4, "Amount of proposals to create")

Expand All @@ -127,10 +126,20 @@ func (a *App) Initialize() {

// Postgres
dbname := os.Getenv("DB_NAME")

// IPFS
if os.Getenv("APP_ENV") == "TEST" || os.Getenv("APP_ENV") == "DEV" {
flag.Bool("ipfs-override", true, "overrides ipfs call")
} else {
flag.Bool("ipfs-override", false, "overrides ipfs call")
}

// TEST Env
if os.Getenv("APP_ENV") == "TEST" {
dbname = os.Getenv("TEST_DB_NAME")
}

// Postgres
a.ConnectDB(
os.Getenv("DB_USERNAME"),
os.Getenv("DB_PASSWORD"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- no going back!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE votes ALTER COLUMN message TYPE TEXT;
3 changes: 2 additions & 1 deletion frontend/packages/client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { HashRouter as Router } from 'react-router-dom';
import NotificationModalProvider from 'contexts/NotificationModal';
import { Web3Provider } from 'contexts/Web3';
import { ErrorHandler } from 'components';
import { IS_PRODUCTION } from 'const';
import Hotjar from '@hotjar/browser';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
Expand Down Expand Up @@ -36,7 +37,7 @@ function App() {
</Router>
</NotificationModalProvider>
</Web3Provider>
<ReactQueryDevtools initialIsOpen={false} />
{!IS_PRODUCTION && <ReactQueryDevtools initialIsOpen={false} />}
</QueryClientProvider>
</ErrorBoundary>
);
Expand Down
3 changes: 3 additions & 0 deletions frontend/packages/client/src/const/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const COMMUNITY_DESCRIPTION_MAX_LENGTH = 1000;
export const HAS_DELAY_ON_START_TIME =
process.env.REACT_APP_APP_ENV?.toUpperCase() === 'PRODUCTION';

export const IS_PRODUCTION =
process.env.REACT_APP_APP_ENV?.toUpperCase() === 'PRODUCTION';

export const FilterValues = {
all: 'All',
active: 'Active',
Expand Down

0 comments on commit ac6760a

Please sign in to comment.