-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
100 lines (94 loc) · 2.17 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
91
92
93
94
95
96
97
98
99
100
services:
web:
build:
context: .
dockerfile: Dockerfile
command: /scripts/django/start
ports:
- "22300:22300"
volumes:
- ${PWD}/hackathons_canada/local_settings.py:/app/hackathons_canada/local_settings.py:ro
- /srv/static:/app/static2
- /srv/media:/app/media
- ./logs/:/logs/
depends_on:
- postgres
- valkey
env_file:
- .env
restart: unless-stopped
valkey:
image: "valkey/valkey:7.2-alpine"
restart: always
postgres:
image: postgres:16-alpine
shm_size: 128mb
volumes:
- ../postgres:/var/lib/postgresql/data/
- ${PWD}/scripts/postgres-init-db.sh:/docker-entrypoint-initdb.d/postgres-init-db.sh
env_file: .env
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_USER: "hackathons_canada_superuser"
POSTGRES_DB: "hackathons"
restart: always
healthcheck:
test: ["CMD", "pg_isready -U ${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
interval: 5s
timeout: 20s
retries: 5
celery_worker:
build:
context: .
dockerfile: Dockerfile
image: celery_worker
command: /scripts/celery/worker/start
volumes:
- .:/app
- ./logs/:/logs/
env_file:
- .env
depends_on:
- valkey
- postgres
healthcheck:
test: ["CMD", "/opt/pysetup/.venv/bin/celery", "worker", "-A", "dischannelsaver", "--loglevel=info"]
interval: 10s
retries: 5
celery_beat:
build:
context: .
dockerfile: Dockerfile
image: celery_beat
command: /scripts/celery/beat/start
volumes:
- .:/app
- ./logs/:/logs/
env_file:
- .env
depends_on:
- valkey
- postgres
healthcheck:
test: ["CMD", "/opt/pysetup/.venv/bin/celery", "beat", "-A", "dischannelsaver", "--loglevel=info"]
interval: 10s
retries: 5
flower:
build:
context: .
dockerfile: Dockerfile
image: flower
command: /scripts/flower/start
volumes:
- .:/app
- ./logs/:/logs/
env_file:
- .env
ports:
- 5557:5555
depends_on:
- valkey
- postgres
volumes:
static_volume:
media_volume: