-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 902 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (33 loc) · 902 Bytes
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
version: '3.8'
services:
# The Python application service (Flask/Gunicorn)
cr_parser_app:
build:
context: .
dockerfile: Dockerfile
container_name: cr_parser_app
restart: unless-stopped
# Load all secure and config variables from the .env file
env_file:
- .env
ports:
- "5000:5000"
depends_on:
- nginx
# The Nginx reverse proxy (The public-facing server)
nginx:
image: nginx:latest
container_name: cr_parser_nginx
restart: always
ports:
# Expose port 80 publicly
- "80:80"
volumes:
# Map our custom nginx configuration
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
# Health check to ensure the application is running (Best Practice)
healthcheck:
test: ["CMD", "curl", "-f", "http://cr_parser_app:5000/health"]
interval: 30s
timeout: 10s
retries: 5