-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
95 lines (86 loc) · 1.87 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
version: '3.11'
services:
web:
build:
context: ./src
dockerfile: Dockerfile
command: python manage.py runserver 0.0.0.0:8000
container_name: web-online-store
volumes:
- ./:/usr/src/app/
- /src/static/:/usr/src/app/src/static/
- /src/media/:/usr/src/app/src/media/
ports:
- "8000:8000"
env_file:
- src/.env
depends_on:
- db
- redis
- rabbitmq
db:
image: postgres:14-alpine
container_name: db-store
environment:
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASSWORD}
- POSTGRES_DB=${PG_DATABASE}
volumes:
- postgres_data:/var/lib/postgresql/data/
redis:
image: redis:latest
container_name: redis-store
volumes:
- redis_data:/data/
env_file:
- src/.env
rabbitmq:
image: rabbitmq:3.13-management
container_name: rabbitmq-store
hostname: rabbitmq
ports:
- "15672:15672"
- "5672:5672"
volumes:
- rabbitmq_data:/var/lib/rabbitmq/
- ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
networks:
- rabbitmq
celery:
build:
context: ./src
command: ['celery', '--app=config', 'worker', '--loglevel=info', '--pool=solo']
volumes:
- ./:/usr/src/app/
container_name: celery-store
env_file:
- src/.env
environment:
- BROKER_URL=${RABBIT_URL}
- RESULT_BACKEND=${REDIS_URL}
- BROKER_CONNECTION_RETRY=300
depends_on:
- db
- redis
- rabbitmq
- web
celery-beat:
build:
context: ./src
command: ['celery', '-A', 'config', 'beat', '-l', 'info']
volumes:
- ./:/usr/src/app/
container_name: celery-beat-store
depends_on:
- web
- db
- redis
- rabbitmq
- celery
volumes:
postgres_data:
redis_data:
rabbitmq_data:
networks:
rabbitmq:
driver: bridge