-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevelopment.yml
62 lines (58 loc) · 1.3 KB
/
development.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
version: "3.9"
services:
db:
image: postgres
volumes:
- ./data/postgres:/var/lib/postgresql/data
env_file:
- .env
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "2345:5432"
backend: # initializes python server
image: backend
build: .
command: bash -c "python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
env_file:
- .env
depends_on:
db:
condition: service_healthy
rabbit:
condition: service_healthy
# RabbitMQ broker
rabbit:
image: rabbitmq:3-management
hostname: rabbit-host
env_file:
- .env
ports:
- "5672:5672"
- "15672:15672" # here, we can access rabbitmq management plugin
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "status"]
interval: 10s
timeout: 5s
retries: 5
celery-worker: # python worker instance
image: backend
command: celery -A root worker --loglevel=INFO --concurrency=10
env_file:
- .env
depends_on:
db:
condition: service_healthy
rabbit:
condition: service_healthy
volumes:
- .:/code