forked from nickjj/build-a-saas-app-with-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1.22 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
version: "3.4"
services:
redis:
env_file:
- ".env"
image: "redis:5.0.7-buster"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
volumes:
- "redis:/data"
web:
build:
context: "."
args:
- "FLASK_ENV=${FLASK_ENV:-production}"
depends_on:
- "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}"
volumes:
- "${DOCKER_WEB_VOLUME:-./public:/app/public}"
worker:
build:
context: "."
args:
- "FLASK_ENV=${FLASK_ENV:-production}"
command: celery worker -B -l info -A snakeeyes.blueprints.contact.tasks
depends_on:
- "redis"
env_file:
- ".env"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
volumes:
- "${DOCKER_WEB_VOLUME:-./public:/app/public}"
volumes:
redis: {}