-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
executable file
·203 lines (186 loc) · 4.35 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
version: "3.7"
services:
nostradamus-core:
container_name: nostradamus-core
image: &nostradamus-core nostradamus-core
restart: "on-failure"
build:
context: ./nostradamus
dockerfile: Dockerfile
command: bash -c "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn -c gunicorn-conf.py nostradamus.asgi"
env_file: &envfile
- .env
links:
- mongodb
- redis
- postgresql
depends_on:
- redis
- postgresql
ports:
- "8000:8000"
nostradamus-frontend:
container_name: nostradamus-frontend
restart: "always"
build:
context: ./frontend
dockerfile: Dockerfile
links:
- nostradamus-core
- flower
environment:
- SERVER_NAME
proxy:
container_name: proxy
restart: "on-failure"
build:
context: ./proxy
dockerfile: Dockerfile
ports:
- mode: host
protocol: tcp
published: 80
target: 80
- mode: host
protocol: tcp
published: 443
target: 8443
depends_on:
- nostradamus-core
- nostradamus-frontend
- channels
- virtual-assistant-core
volumes:
- ./certs:/opt/nginx/certs
# - ./proxy/nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./proxy/nginx/conf.d:/etc/nginx/conf.d
environment:
- SERVER_NAME
redis:
container_name: redis
restart: always
image: redis:6.0.1
ports:
- "6379:6379"
mongodb:
container_name: mongodb
restart: always
image: mongo:4.2.6
ports:
- '27017:27017'
volumes:
- ./mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
command: --wiredTigerCacheSizeGB 4.0
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.8.3
env_file: *envfile
ports:
- 5672:5672
- 15672:15672
channels:
container_name: channels
image: *nostradamus-core
restart: "on-failure"
env_file: *envfile
command: python manage.py runserver 0.0.0.0:8001
links:
- "rabbitmq:rabbitmq"
- mongodb
depends_on:
- rabbitmq
- mongodb
worker:
image: *nostradamus-core
restart: "on-failure"
env_file: *envfile
command: celery -A nostradamus worker --max-memory-per-child=600000 --concurrency=10 -P threads -l info
links:
- "rabbitmq:rabbitmq"
- mongodb
depends_on:
- rabbitmq
- mongodb
scheduler:
container_name: scheduler
image: *nostradamus-core
restart: "on-failure"
env_file: *envfile
command: celery -A nostradamus beat -l info
links:
- "rabbitmq:rabbitmq"
- mongodb
depends_on:
- rabbitmq
flower:
container_name: flower
image: *nostradamus-core
restart: "on-failure"
env_file: *envfile
command: flower -A nostradamus --port=5555 --url-prefix=flower
depends_on:
- worker
- scheduler
virtual-assistant-core:
container_name: virtual-assistant-core
image: rasa/rasa:1.10.3-full
# ports:
# - 5005:5005
build:
context: ./chatbot
dockerfile: Dockerfile-core
command: run --enable-api --cors '*' --debug
env_file: *envfile
restart: "on-failure"
virtual-assistant-actions:
container_name: virtual-assistant-actions
build:
context: ./chatbot
dockerfile: Dockerfile-actions
# expose:
# - "5055"
env_file: *envfile
restart: "on-failure"
# CHECK: postgres volume
postgresql:
container_name: postgresql
image: postgres:12.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file: *envfile
ports:
- 5432:5432
auth:
container_name: auth
build:
context: ./auth
dockerfile: Dockerfile
# ports:
# - "8080:8080"
env_file: *envfile
command: "poetry run uvicorn main:app --reload --host 0.0.0.0 --port 8080"
links:
- postgresql
depends_on:
- postgresql
restart: "on-failure"
ml-core:
container_name: ml-core
build:
context: ./ml-core
dockerfile: Dockerfile
# ports:
# - "8282:8282"
env_file: *envfile
command: "poetry run uvicorn main:app --reload --host 0.0.0.0 --port 8282"
links:
- postgresql
- mongodb
- redis
depends_on:
- postgresql
- mongodb
- redis
restart: "on-failure"
volumes:
postgres_data: