-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
23 lines (19 loc) · 1.09 KB
/
docker-compose.prod.yml
File metadata and controls
23 lines (19 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# docker-compose.prod.yml — defines and manages multiple production containers
services: # Define three services — backend, frontend, and nginx
backend: # Backend service — our Flask API
image: hackitect7/flask-api:latest # Use Docker Hub image built from the backend folder
ports:
- "5000:5000" # Expose container port 5000 to the host for external API access
frontend: # Frontend service — Node.js application
image: hackitect7/node-frontend:latest # Use Docker Hub image built from the frontend folder
ports:
- "3000:3000" # Expose container port 3000 to the host to access frontend directly
nginx: # Nginx service — reverse proxy
image: nginx:latest # Use official nginx image (can be replaced with a custom image if needed)
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf # Mount local nginx config into container to control routing behavior
ports:
- "80:80" # Open port 80 on host for incoming HTTP requests
depends_on: # Ensure nginx starts after backend and frontend are running
- frontend
- backend