-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·82 lines (73 loc) · 1.77 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
version: "3.8"
services:
# redis
redis:
image: redis:7.0-alpine
container_name: redis
# Django app
web:
build: .
container_name: djangousers
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
ports:
- "8000:8000"
networks:
- default
env_file:
- .env
depends_on:
- db
dramatiq_worker:
build: .
container_name: dramatiq_worker
command: python manage.py rundramatiq --processes 1 --threads 2
volumes:
- .:/app
env_file:
- .env
depends_on:
- redis
dramatiq_crontab_worker:
build: .
container_name: dramatiq_crontab_worker
command: python3 manage.py crontab
volumes:
- .:/app
env_file:
- .env
depends_on:
- redis
product_queue_listener:
build: .
container_name: product_queue_listener
command: python manage.py launch_product_queue_listener
volumes:
- .:/app
env_file:
- .env
order_processing_queue_listener_users:
build: .
container_name: order_processing_queue_listener_users
command: python manage.py launch_order_processing_queue_listener
volumes:
- .:/app
env_file:
- .env
db:
image: postgres:15.4-alpine
container_name: postgres_db
volumes:
- postgres_data:/var/lib/postgresql/data/
- ./init-database.sh:/docker-entrypoint-initdb.d/init-database.sh
environment:
- POSTGRES_PASSWORD=${SUPER_USER_PWD}
- SQL_DATABASE=${SQL_DATABASE}
- SQL_USER=${SQL_USER}
- SQL_PASSWORD=${SQL_PASSWORD}
volumes:
postgres_data: