Skip to content

Commit e6a13dd

Browse files
committed
Fix env vars for react wrapper
1 parent 5be50fd commit e6a13dd

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey
3636
HASURA_GRAPHQL_JWT_SECRET={"type":"RS256","jwk_url":"http://fusionauth:9011/.well-known/jwks.json"}
3737
HASURA_GRAPHQL_DATABASE_URL=postgres://$TSDB_POSTGRES_USER:$TSDB_POSTGRES_PASSWORD@tsdb:5432/postgres?sslmode=disable
3838

39-
#react wrapper
39+
#react wrapper
40+
# http://service-name is not going to work as we are building a static build
41+
# and serving it through nginx
42+
# use actual IP address instead
4043
REACT_APP_ENKETO_URL=http://enketo-express:8065
4144
REACT_APP_FORM_MANAGER_URL=http://form-manager:3006
4245
REACT_APP_HASURA_URL=http://gql:8080

.gitpod.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ tasks:
2424
# sed -i~ "/^MINIO_ENDPOINT=/s/=.*/=9000-${GITPOD_WORKSPACE_URL:8}/" .env
2525
# sed -i~ "/^MINIO_PORT=/s/=.*/=80/" .env
2626
# sed -i~ "/^MINIO_USE_SSL=/s/=.*/=true/" .env
27-
# sed -i~ "/^REACT_APP_ENKETO_URL=/s/=.*/=https\:\/\/8065-${GITPOD_WORKSPACE_URL:8}/" .env
28-
# sed -i~ "/^REACT_APP_FORM_MANAGER_URL=/s/=.*/=https\:\/\/3006-${GITPOD_WORKSPACE_URL:8}/" .env
29-
# sed -i~ "/^REACT_APP_HASURA_URL=/s/=.*/=https\:\/\/8080-${GITPOD_WORKSPACE_URL:8}/" .env
27+
# Replace env vars for react wrapper
28+
sed -i~ "/^REACT_APP_ENKETO_URL=/s/=.*/=https\:\/\/8065-${GITPOD_WORKSPACE_URL:8}/" .env
29+
sed -i~ "/^REACT_APP_FORM_MANAGER_URL=/s/=.*/=https\:\/\/3006-${GITPOD_WORKSPACE_URL:8}/" .env
30+
sed -i~ "/^REACT_APP_HASURA_URL=/s/=.*/=https\:\/\/8080-${GITPOD_WORKSPACE_URL:8}/" .env
3031
3132
docker-compose up -d
3233
gp sync-done setup

0 commit comments

Comments
 (0)