switch in .env for dev/prod
This commit is contained in:
parent
773b4773eb
commit
a3b0fffe45
7 changed files with 29 additions and 22 deletions
|
@ -16,23 +16,29 @@ services:
|
|||
backend:
|
||||
image: recipes_backend
|
||||
container_name: recipes_backend
|
||||
build: ./backend
|
||||
build:
|
||||
context: ./backend
|
||||
args:
|
||||
NODE_ENV: ${NODE_ENV}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./backend:/usr/src/app
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NODE_ENV=${NODE_ENV}
|
||||
- DB_USER=${DB_USER}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- DB_NAME=${DB_NAME}
|
||||
frontend:
|
||||
image: recipes_frontend
|
||||
container_name: recipes_frontend
|
||||
build: ./frontend
|
||||
build:
|
||||
context: ./backend
|
||||
args:
|
||||
NODE_ENV: ${NODE_ENV}
|
||||
ports:
|
||||
- "8081:80"
|
||||
volumes:
|
||||
- ./frontend:/usr/src/app
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NODE_ENV=${NODE_ENV}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue