Skip to content

Commit

Permalink
Make sure the env vars are defined before building the prod bundle in…
Browse files Browse the repository at this point in the history
… Docker. (#2)
  • Loading branch information
pcorpet authored Jan 21, 2019
1 parent 4d36fd3 commit c13de2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ services:
- ./shared:/usr/src/app/src/shared:ro
- ./shared:/usr/src/shared:ro
build:
args:
- GA_ID
- MAPBOX_TOKEN
context: .
dockerfile: ./frontend/Dockerfile
ports:
Expand Down
3 changes: 3 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM node:9.11.1

ARG MAPBOX_TOKEN
ENV MAPBOX_TOKEN "$MAPBOX_TOKEN"
ARG GA_ID
ENV GA_ID "$GA_ID"

# Set up nginx to proxy requests.
# Should probably switch to express since we are in a node container anyway.
Expand Down

0 comments on commit c13de2d

Please sign in to comment.