-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
49 lines (47 loc) · 1.23 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
services:
nginx-proxy:
build:
context: ./nginx
restart: always
environment:
- FLASK_SERVER_ADDR=flask-app:8000
- FILE_SERVER_ADDR=file-server:8080
ports:
- "${HOST}:${PORT}:80"
depends_on:
- flask-app
- file-server
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:80/health-check || exit 1"]
interval: 10s
timeout: 10s
retries: 3
command: /app/start.sh
flask-app:
build:
context: ./flask
restart: always
env_file: ".env"
volumes:
- ./data/blog_data:/blog/data:ro
environment:
- FLASK_SERVER_PORT=8000
- PYTHONUNBUFFERED=TRUE
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:8000/flask-health-check || exit 1"]
interval: 10s
timeout: 10s
retries: 3
command: gunicorn -w 3 -t 60 -b 0.0.0.0:8000 --chdir /blog/app app:app
file-server:
build:
context: ./file-server
restart: always
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:8080/files/health-check || exit 1"]
interval: 10s
timeout: 10s
retries: 3
volumes:
- ./data/static:/root/static:ro
command: -document_root=/root -addr=:8080