-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (35 loc) · 1.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# docker-compose.yml
services:
survey_api_prod: # Renamed service to match container_name convention
build:
context: ./api/
dockerfile: Dockerfile
container_name: survey_api_prod
environment:
- MONGO_URL=mongodb://mongodb_prod:27017 # CORRECTED: Match service name
- DATABASE_NAME=survey_db_prod
- SESSION_SECRET_KEY=${SESSION_SECRET_KEY_PROD:-a_very_strong_default_prod_secret} # Use default if not in .env
- PROD_UI_DOMAIN=${PROD_UI_DOMAIN:-your-app.com} # For CORS settings
restart: always
stop_grace_period: 2s
nginx_prod_proxy:
depends_on:
- survey_api_prod
build:
context: ./ui/
dockerfile: Dockerfile
container_name: nginx_prod_proxy
ports:
- "80:80"
restart: always
mongodb_prod:
image: mongo:latest
container_name: mongodb_prod
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongodb_prod_data:/data/db
restart: always
command: ["mongod", "--port", "27017"]
volumes:
mongodb_prod_data: