3e59c2caaa
- Add docker-compose.override.yml to .gitignore to prevent it from being included in production. - Modify docker-compose.yaml to ensure the frontend service depends on the backend service.
38 lines
592 B
YAML
38 lines
592 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
container_name: backend
|
|
ports:
|
|
- "8070:8000"
|
|
volumes:
|
|
- ./backend:/app
|
|
depends_on:
|
|
- db
|
|
env_file:
|
|
- backend/.env
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
container_name: frontend
|
|
ports:
|
|
- "8071:5173"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
depends_on:
|
|
- backend
|
|
|
|
db:
|
|
image: mongo:4.4
|
|
container_name: mongo
|
|
restart: always
|
|
ports:
|
|
- "27018:27017"
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
|
|
volumes:
|
|
mongo_data:
|