-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (57 loc) · 1.14 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
version: "3.9"
x-app: &app-config
image: soccer-manager-dev
build:
context: .
volumes:
- .:/code
- dev-static-data:/vol/web
env_file:
- .env
restart: always
services:
app:
<<: *app-config
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
depends_on:
- db
- redis
db:
image: postgres:16-alpine
volumes:
- dev-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
redis:
image: "redis:6.2.5-alpine"
ports:
- "6379:6379"
celeryworkers:
<<: *app-config
command: >-
celery -A config worker -l DEBUG
depends_on:
- redis
- db
celerybeat:
<<: *app-config
command: >-
celery -A config beat -l DEBUG
depends_on:
- redis
- db
volumes:
dev-db-data:
dev-static-data: