-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
144 lines (121 loc) · 2.6 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
services:
app:
container_name: django-app
build: .
command: sh -c "python3 manage.py makemigrations accounts interactions podcasts && python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8000"
volumes:
- app:/app
networks:
- main
ports:
- 8000:8000
depends_on:
- db
restart: always
db:
image: postgres:14
container_name: postgresql-db
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
networks:
- main
env_file:
- .env
restart: always
elasticsearch:
image: elasticsearch:8.9.0
container_name: elasticsearch
volumes:
- esdata:/usr/share/elasticsearch/data
environment:
discovery.type: single-node
ES_JAVA_OPTS: -Xms512m -Xmx512m
xpack.security.enabled: 'false'
networks:
- main
ports:
- 9200:9200
mem_limit: 1g
restart: always
kibana:
image: kibana:8.9.0
container_name: kibana
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
networks:
- main
ports:
- 5601:5601
depends_on:
- elasticsearch
redis:
image: redis:7
container_name: redis
networks:
- main
volumes:
- redis:/redis
rabbitmq:
image: "rabbitmq:3-management"
container_name: rabbitmq
networks:
- main
ports:
- 5672:5672
- 15672:15672
volumes:
- rabbitmq_data:/var/lib/rabbitmq
- rabbitmq_log:/var/log/rabbitmq
celery:
build: .
container_name: celery
command: celery -A config worker -l info
networks:
- main
volumes:
- celery:/celery
restart: always
depends_on:
- rabbitmq
- redis
- app
celery-beat:
build: .
container_name: celery-beat
command: celery -A config beat -l info
networks:
- main
volumes:
- celery-beat:/celery-beat
depends_on:
- rabbitmq
- redis
- app
message-queue:
build: .
container_name: rabbitmq-message-queue
command: python3 manage.py start_consumers
networks:
- main
volumes:
- queue:/var/lib/queue
depends_on:
- app
- rabbitmq
restart: always
networks:
main:
volumes:
app:
postgres-data:
redis:
rabbitmq_data:
rabbitmq_log:
celery:
celery-beat:
esdata:
queue: