-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
73 lines (67 loc) · 1.79 KB
/
docker-compose.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: "3.4"
services:
postgres:
env_file:
- ".env"
image: "postgres:11.2"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
# ports:
# - "${DOCKER_POSTGRES_PORT:-127.0.0.1:5432}:5432"
# stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
expose:
- "5432:5432"
stop_grace_period: 3s
volumes:
- "postgres:/var/lib/postgresql/data"
redis:
env_file:
- ".env"
image: "redis:5.0.4-stretch"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
# stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
stop_grace_period: 3s
volumes:
- "redis:/data"
web:
build:
context: "."
args:
- "FLASK_ENV=${FLASK_ENV:-production}"
depends_on:
- "postgres"
- "redis"
env_file:
- ".env"
healthcheck:
test: "${DOCKER_HEALTHCHECK_TEST:-curl localhost:8000/healthy}"
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
ports:
- "${DOCKER_WEB_PORT:-127.0.0.1:8000}:8000"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
# stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
stop_grace_period: 3s
volumes:
- "${DOCKER_WEB_VOLUME:-./public:/app/public}"
worker:
build:
context: "."
args:
- "FLASK_ENV=${FLASK_ENV:-production}"
#command: celery worker -l info -A snakegame.blueprints.contact.tasks
command: celery -A snakegame.blueprints.contact.tasks worker -B -l info
depends_on:
- "postgres"
- "redis"
env_file:
- ".env"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
# stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
stop_grace_period: 3s
volumes:
- "${DOCKER_WEB_VOLUME:-./public:/app/public}"
volumes:
postgres: {}
redis: {}