Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
Docker prod builds now can take environment varaibles
Browse files Browse the repository at this point in the history
Docker prod builds now can take environment varaibles
  • Loading branch information
dabeeeenster committed Jun 1, 2020
1 parent ba74b10 commit 0e8b7b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ COPY --from=development --chown=root:root /srv/bt/node_modules ./node_modules
COPY . .

ENV ENV prod
RUN npm run env
RUN npm run bundle

EXPOSE 8080
CMD [ "npm", "run", "start" ]
CMD [ "./bin/docker/run-docker.sh" ]
3 changes: 3 additions & 0 deletions bin/docker/run-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
npm run env
npm run bundle
npm run start
5 changes: 2 additions & 3 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ services:
bullettrain:
build:
context: .
command: npm run start
environment:
- API_URL=http://localhost:8000/api/v1/
- ASSET_URL=http://localhost:8080/
ports:
- '8080:8080'
volumes:
- chat_node_modules:/srv/chat/node_modules
- bt_node_modules:/srv/bt/node_modules

volumes:
chat_node_modules:
bt_node_modules:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
target: development
dockerfile: Dockerfile.dev
dockerfile: Dockerfile
command: npm run dev
environment:
- API_URL=http://localhost:8000/api/v1/
Expand Down

0 comments on commit 0e8b7b0

Please sign in to comment.