switch in .env for dev/prod

This commit is contained in:
fred 2025-07-25 16:00:55 -07:00
parent 773b4773eb
commit a3b0fffe45
7 changed files with 29 additions and 22 deletions

View file

@ -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}