-
Notifications
You must be signed in to change notification settings - Fork 189
/
docker-compose.yml
90 lines (84 loc) · 2.09 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
x-app: &default-app
build:
context: "."
target: "app"
args:
- "UID=${UID:-1000}"
- "GID=${GID:-1000}"
- "FLASK_DEBUG=${FLASK_DEBUG:-false}"
- "NODE_ENV=${NODE_ENV:-production}"
depends_on:
redis:
condition: "service_started"
required: false
env_file:
- ".env"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
tty: true
volumes:
- "${DOCKER_WEB_VOLUME:-./public:/app/public}"
services:
redis:
deploy:
resources:
limits:
cpus: "${DOCKER_REDIS_CPUS:-0}"
memory: "${DOCKER_REDIS_MEMORY:-0}"
image: "redis:7.2.3-bookworm"
profiles: ["redis"]
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
volumes:
- "redis:/data"
web:
<<: *default-app
deploy:
resources:
limits:
cpus: "${DOCKER_WEB_CPUS:-0}"
memory: "${DOCKER_WEB_MEMORY:-0}"
healthcheck:
test: "${DOCKER_WEB_HEALTHCHECK_TEST:-curl localhost:8000/up}"
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
ports:
- "${DOCKER_WEB_PORT_FORWARD:-127.0.0.1:8000}:8000"
profiles: ["web"]
worker:
<<: *default-app
command: celery -A "snakeeyes.app.celery_app" worker -l "${CELERY_LOG_LEVEL:-INFO}"
deploy:
resources:
limits:
cpus: "${DOCKER_WORKER_CPUS:-0}"
memory: "${DOCKER_WORKER_MEMORY:-0}"
profiles: ["worker"]
webpack:
build:
context: "."
target: "assets"
args:
- "UID=${UID:-1000}"
- "GID=${GID:-1000}"
- "NODE_ENV=${NODE_ENV:-production}"
command: "yarn run watch"
env_file:
- ".env"
profiles: ["assets"]
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "0"
tty: true
volumes:
- ".:/app"
mail:
image: "sj26/mailcatcher:v0.8.2"
ports:
- "${DOCKER_MAIL_PORT_FORWARD:-127.0.0.1:1080}:1080"
profiles: ["mail"]
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "0"
volumes:
redis: {}