-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
76 lines (70 loc) · 1.77 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
74
75
76
version: "3.4"
services:
backend:
container_name: backend
build:
context: .
dockerfile: Dockerfile.api
image: react-flask-app-api
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
client:
build:
context: .
dockerfile: Dockerfile.client
image: react-flask-app-client
ports:
- "3000:3000"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
redis:
env_file:
- ".env"
image: "redis:5.0.4-stretch"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
volumes:
- "redis:/data"
expose:
- '6379'
ports:
- '6379:6379'
# web:
# build:
# dockerfile: Dockerfile.api
# context: "."
# args:
# - "FLASK_ENV=${FLASK_ENV:-production}"
# depends_on:
# - "redis"
# env_file:
# - ".env"
# healthcheck:
# test: "${DOCKER_HEALTHCHECK_TEST:-curl localhost:5000/healthy}"
# interval: "60s"
# timeout: "3s"
# start_period: "5s"
# retries: 3
# ports:
# - "${DOCKER_WEB_PORT:-127.0.0.1:5000}:5000"
# restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
# stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
# volumes:
# - "${DOCKER_WEB_VOLUME:-./public:/app/public}"
worker:
build:
dockerfile: Dockerfile.api
context: "."
args:
- "FLASK_ENV=${FLASK_ENV:-production}"
command: celery -A celery_worker.celery worker
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}"
links:
- redis
volumes:
redis: {}