-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
34 lines (30 loc) · 1.05 KB
/
docker-compose.yaml
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
services:
flask_app:
build: .
container_name: flask_app
volumes:
- .:/opt/improver # Mount current directory to allow Flask to access everything it needs
- ./logs:/opt/improver/logs # Persist logs to host
- ./config:/config # Mount configuration file to ensure it's accessible
- ./media:/media # Mount configuration file to ensure it's accessible
ports:
- "5001:5001" # Expose Flask app to port 5001
environment:
FLASK_ENV: development # Sets Flask to development mode for Docker
SETTINGS_FILE: /config/py-config-gs-dev.json # Use the config file from the mounted volume
networks:
- improver_network
nginx:
image: nginx:alpine
container_name: nginx_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf # Use a custom nginx configuration file
ports:
- "80:80" # Expose Nginx to port 80
depends_on:
- flask_app # Ensure Flask app is ready before Nginx starts
networks:
- improver_network
networks:
improver_network:
driver: bridge