-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (53 loc) · 1.19 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
services:
web:
build: .
command: >
sh -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
ports:
- "8000:8000"
environment:
- DJANGO_SETTINGS_MODULE=app.settings
env_file:
- .env
depends_on:
rabbitmq:
condition: service_healthy
db:
condition: service_started
db:
image: postgres:17-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env
rabbitmq:
image: rabbitmq:4.0.3-management-alpine
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_VHOST}
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
interval: 10s
timeout: 5s
retries: 5
celery:
build: .
command: celery -A app worker -l INFO -c 1
volumes:
- .:/app
env_file:
- .env
depends_on:
rabbitmq:
condition: service_healthy
web:
condition: service_started
volumes:
postgres_data: