Add environment variable to docker containers

This commit is contained in:
Charles Bochet 2023-01-28 16:16:46 +01:00
parent e8db5136bb
commit fe7031f8dc
4 changed files with 21 additions and 1 deletions

View File

@ -41,6 +41,13 @@ workflows:
region: $AWS_REGION
repo: $AWS_ECR_REPO
tag: $CIRCLE_SHA1
extra-build-args: >
--build-arg REACT_APP_AUTH0_DOMAIN=$REACT_APP_AUTH0_DOMAIN
--build-arg REACT_APP_AUTH0_CLIENT_ID=$REACT_APP_AUTH0_CLIENT_ID
--build-arg REACT_APP_AUTH0_CALLBACK_URL=$REACT_APP_AUTH0_CALLBACK_URL
--build-arg REACT_APP_AUTH0_AUDIENCE=$REACT_APP_AUTH0_AUDIENCE
--build-arg REACT_APP_API_URL=$REACT_APP_API_URL
- aws-ecs/deploy-service-update:
name: deploy-server-canary
requires:
@ -95,6 +102,8 @@ workflows:
region: $AWS_REGION
repo: $AWS_ECR_REPO_API
tag: $CIRCLE_SHA1
extra-build-args: >
--build-arg HASURA_GRAPHQL_JWT_SECRET=$HASURA_GRAPHQL_JWT_SECRET
- aws-ecs/deploy-service-update:
name: deploy-api-canary
requires:

View File

@ -1,6 +1,8 @@
HASURA_GRAPHQL_JWT_SECRET=REPLACE_ME
HASURA_GRAPHQL_ADMIN_SECRET=hasura_secret
REACT_APP_AUTH0_DOMAIN=twenty-dev.eu.auth0.com
REACT_APP_AUTH0_CLIENT_ID=REPLACE_ME
REACT_APP_AUTH0_CALLBACK_URL=http://localhost:3001/auth/callback
REACT_APP_AUTH0_AUDIENCE=hasura-dev
REACT_APP_AUTH0_AUDIENCE=hasura-dev
REACT_APP_API_URL=http://localhost:8080/v1/graphql

View File

@ -1,3 +1,6 @@
FROM hasura/graphql-engine:latest as api
ARG HASURA_GRAPHQL_JWT_SECRET
ENV HASURA_GRAPHQL_JWT_SECRET=${HASURA_GRAPHQL_JWT_SECRET}
CMD ["sh", "-c", "graphql-engine serve"]

View File

@ -1,5 +1,11 @@
FROM node:18-alpine as app
ARG REACT_APP_API_URL
ARG REACT_APP_AUTH0_DOMAIN
ARG REACT_APP_AUTH0_CLIENT_ID
ARG REACT_APP_AUTH0_CALLBACK_URL
ARG REACT_APP_AUTH0_AUDIENCE
WORKDIR /app
COPY . .