-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
78 lines (68 loc) · 1.53 KB
/
docker-compose.yaml
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
version: '3.8'
services:
db:
image: postgres:15.4-alpine
container_name: postgresql-db
volumes:
- db_volume:/var/lib/postgresql/data/
env_file:
- ./.env
redis:
image: redis:7.2.1-alpine
container_name: redis
python-base:
image: python-base
build: ./django_test/
env_file:
- ./.env
celery_worker:
image: python-base
container_name: celery_worker
env_file:
- ./.env
command: celery -A django_test worker --loglevel=info
depends_on:
- redis
celery_beat:
image: python-base
container_name: celery_beat
env_file:
- ./.env
command: celery -A django_test beat --loglevel=info
depends_on:
- redis
celery_flower:
image: mher/flower:2.0.1
container_name: celery_flower
command: celery --broker=redis://redis:6379/0 flower --port=5555 --url_prefix='flower'
depends_on:
- redis
web:
image: python-base
container_name: web
restart: always
volumes:
- static_volume:/app/static/
- media_volume:/app/media/
depends_on:
- db
- celery_beat
- celery_worker
env_file:
- ./.env
command: gunicorn django_test.wsgi:application --bind 0:8000
nginx:
image: nginx:1.25.2-alpine
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- static_volume:/var/html/static/
- media_volume:/var/html/media/
depends_on:
- web
volumes:
db_volume:
static_volume:
media_volume: