-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
233 lines (205 loc) · 6.78 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
version: '3'
services:
web:
container_name: web
build:
context: .
dockerfile: web/Dockerfile.web
init: true # To be able to kill docker from inside. Reference: https://stackoverflow.com/a/31539425
volumes:
- ./web/django_api:/app/:rw #Development
- ./web/django_api/logic/algorithms/object_detection/src/models/cfg/config.json:/app/logic/algorithms/object_detection/src/models/cfg/config.json #Development
# - /tmp/.X11-unix:/tmp/.X11-unix:rw #Production
- ./web/django_api/aiders/media:/app/aiders/media:rw #Production
- /dev/:/dev/
device_cgroup_rules:
- 'c 188:* rmw'
network_mode: 'host'
env_file:
- ./.env
logging:
driver: 'json-file'
options:
max-size: '15m'
max-file: '5'
depends_on:
- db
cv:
container_name: cv
runtime: nvidia # nvidia-runtime
deploy: # nvidia-runtime
resources: # nvidia-runtime
reservations: # nvidia-runtime
devices: # nvidia-runtime
- driver: nvidia # nvidia-runtime
device_ids: ['0'] # nvidia-runtime
capabilities: [gpu,video] # nvidia-runtime
build:
context: .
dockerfile: cv/Dockerfile.cv
volumes:
- ./cv/app:/app # Development
- ./_shared_code/database/connection.py:/app/database/connection.py
- ./db_states.txt:/db_states.txt
- ./web/django_api/aiders/media:/media:rw # django's media folder
# - ./aidersplatform/django_api/logic/algorithms/object_detection/src/models/cfg/config.json:/usr/src/aidersplatform/django_api/logic/algorithms/object_detection/src/models/cfg/config.json #Development
network_mode: 'host'
env_file:
- ./.env
depends_on:
- db
ros:
container_name: ros
build:
context: .
dockerfile: ros/Dockerfile.ros
volumes:
- ./ros/app:/app # Development
- ./_shared_code/database/connection.py:/app/database/connection.py
- ./db_states.txt:/db_states.txt
- /dev/:/dev/ # container access to USB devices
device_cgroup_rules:
- 'c 188:* rmw'
network_mode: host
env_file:
- ./.env
environment:
- ROS_IP=$NET_IP
- ROS_MASTER_URI=http://${NET_IP}:11311
depends_on:
- db
lsc:
container_name: lsc
build:
context: .
dockerfile: lsc/Dockerfile.lsc
volumes:
- ./lsc/app:/app # Development
- ./_shared_code/database/connection.py:/app/database/connection.py
- ./db_states.txt:/db_states.txt
- ./web/django_api/aiders/media:/media:rw # django's media folder
network_mode: host
env_file:
- ./.env
depends_on:
- db
alg:
container_name: alg
build:
context: .
dockerfile: alg/Dockerfile.alg
volumes:
- ./alg/app:/app # Development
- ./_shared_code/database/connection.py:/app/database/connection.py
- ./db_states.txt:/db_states.txt
- ./web/django_api/aiders/media:/media:rw # django's media folder
network_mode: host
env_file:
- ./.env
depends_on:
- db
mav:
container_name: mav
build:
context: .
dockerfile: mav/Dockerfile.mav
volumes:
- ./mav/app:/app # Development
- ./_shared_code/database/connection.py:/app/database/connection.py
- ./db_states.txt:/db_states.txt
- ./web/django_api/aiders/media:/media:rw # django's media folder
network_mode: host
env_file:
- ./.env
depends_on:
- db
ws:
container_name: ws
build:
context: .
dockerfile: ws/Dockerfile.ws
# dockerfile: ws/Dockerfile.ws.dev # Development
# volumes:
# - ./ws/app:/application # Development
network_mode: host
env_file:
- ./.env
depends_on:
- db
ccd:
container_name: ccd
build:
context: .
dockerfile: ccd/Dockerfile.ccd
network_mode: host
env_file:
- ./.env
depends_on:
- db
rtmp:
container_name: rtmp
build:
context: .
dockerfile: rtmp/Dockerfile.rtmp
network_mode: host
ports:
- '1935:1935'
nginx:
container_name: nginx
build:
context: .
dockerfile: nginx/Dockerfile.nginx
network_mode: host
ports:
- "${NGINX_PORT}:${NGINX_PORT}"
env_file:
- ./.env
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf # Path to your Nginx configuration file
- ./nginx/templates/default.conf.template:/etc/nginx/conf.d/default.conf.template
- ./web/django_api/aiders/static:/app/aiders/static:rw #Production
- ./web/django_api/aiders/media:/app/aiders/media:rw #Production
depends_on:
- web
command: /bin/bash -c "envsubst '$$NGINX_PORT $$NET_IP $$WEB_URL' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
db:
container_name: db
build:
context: .
dockerfile: db/Dockerfile.db
restart: unless-stopped
env_file:
- ./.env
environment:
MYSQL_USER: ${SQL_USER}
MYSQL_PASSWORD: ${SQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${SQL_PASSWORD}
MYSQL_DATABASE: ${SQL_DATABASE}
network_mode: 'host'
volumes:
- mysql-data:/var/lib/mysql
# - ./db-logs:/var/log/mysql:rw
odm:
container_name: odm
build:
context: .
dockerfile: odm/Dockerfile.odm
ports:
- '4000:3000'
geo:
container_name: geo
build:
context: .
dockerfile: geo/Dockerfile.geo
command:
- run
ports:
- '8081:80'
environment:
ALLOW_CORS: enabled
volumes:
- ./geo/osm-data:/data/database/
- ./geo/osm-data:/data/tiles/
volumes:
mysql-data:
driver: local