-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (80 loc) · 1.99 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
version: "3.9"
services:
redis:
image: redis:7.2-alpine
rabbitmq:
image: rabbitmq:3.12-management
db:
image: postgres:16.0-alpine
command: -c max_wal_size=2GB
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- postgresql_data:/var/lib/postgresql/data/
pgbouncer:
image: edoburu/pgbouncer:latest
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
- POOL_MODE=transaction
ports:
- "5432:5432"
depends_on:
- db
web:
env_file:
- .env
build: .
command: sh -c "python manage.py collectstatic --no-input --clear && gunicorn -b 0.0.0.0:8000 -k uvicorn.workers.UvicornWorker core.asgi:application"
volumes:
- .:/code
- /code/static/css # Exclude directory from mount to avoid masking new CSS file
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
expose:
- 8000
depends_on:
- redis
- rabbitmq
- pgbouncer
worker:
env_file:
- .env
build: .
command: celery -A core worker --without-heartbeat --without-gossip --without-mingle -l INFO
volumes:
- .:/code
- /code/static/css # Exclude directory from mount to avoid masking new CSS file
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
depends_on:
- redis
- rabbitmq
- pgbouncer
beat:
env_file:
- .env
build: .
command: celery -A core beat -l INFO
volumes:
- .:/code
- /code/static/css # Exclude directory from mount to avoid masking new CSS file
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
depends_on:
- redis
- rabbitmq
- pgbouncer
nginx:
build: ./nginx
restart: on-failure
volumes:
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
ports:
- "80:80"
depends_on:
- web
volumes:
postgresql_data: null
static_volume: null
media_volume: null