forked from eurocontrol-swim/geofencing-prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
209 lines (195 loc) · 6.45 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
version: "3.5"
services:
sm-db:
image: swim-postgres
build:
context: ./
dockerfile: ./services/db/postgres/Dockerfile
container_name: postgres
environment:
- DB_NAME=smdb
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASS}
- DB_USER=${SM_DB_USER}
- DB_PASS=${SM_DB_PASS}
volumes:
- sm-db-data:/var/lib/postgresql/data
- ./services/db/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d/
command: postgres -c config_file=/etc/postgresql.conf
networks:
- backend
geofencing-db:
image: swim-mongo
build:
context: ./
dockerfile: ./services/db/mongo/Dockerfile
container_name: mongo
ports:
- 27017:27017
environment:
- DB_NAME=geodb
- DB_USER=${GEOFENCING_DB_USER}
- DB_PASS=${GEOFENCING_DB_PASS}
volumes:
- geofencing-db-data:/data/db
- geofencing-db-config:/data/configdb
networks:
- backend
broker:
image: rabbitmq_amqp10
hostname: rabbitmq
build:
context: ./
dockerfile: ./services/broker/rabbitmq/Dockerfile
args:
- BROKER_ADMIN_USER=${BROKER_ADMIN_USER}
- BROKER_ADMIN_PASS=${BROKER_ADMIN_PASS}
container_name: rabbitmq
ports:
- 15671:15671
volumes:
- broker-data:/var/lib/rabbitmq
- ./secrets/rabbitmq/rabbitmq_definitions.json /etc/rabbitmq/rabbitmq_definitions.json
networks:
- backend
web-server:
image: swim-nginx
build:
context: ./
dockerfile: ./services/web_server/nginx/Dockerfile
container_name: nginx
ports:
- 80:8000
- 443:8443
volumes:
- ./services/web_server/nginx/conf.d/:/etc/nginx/conf.d/
depends_on:
- subscription-manager
- geofencing-service
networks:
- backend
subscription-manager:
image: subscription-manager
build: ./services/subscription_manager/src
container_name: subscription_manager
depends_on:
- sm-db
- broker
environment:
- DB_NAME=smdb
- DB_USER=${SM_DB_USER}
- DB_PASS=${SM_DB_PASS}
- BROKER_MGMT_USER=${BROKER_MGMT_USER}
- BROKER_MGMT_PASS=${BROKER_MGMT_PASS}
volumes:
- ./secrets/rabbitmq/ca_certificate.pem:/secrets/ca_certificate.pem
- ./services/subscription_manager/config.yml:/app/subscription_manager/_config.yml
- ./services/subscription_manager/entry.sh:/app/entry.sh
command: bash /app/entry.sh
networks:
- backend
subscription-manager-provision:
image: subscription-manager
build: ./services/subscription_manager/src
container_name: subscription_manager_provision
depends_on:
- broker
- sm-db
environment:
- DB_NAME=smdb
- GEOFENCING_VIEWER_BROKER_USER=${GEOFENCING_VIEWER_BROKER_USER}
- GEOFENCING_VIEWER_BROKER_PASS=${GEOFENCING_VIEWER_BROKER_PASS}
- DB_USER=${SM_DB_USER}
- DB_PASS=${SM_DB_PASS}
- SM_ADMIN_USER=${SM_ADMIN_USER}
- SM_ADMIN_PASS=${SM_ADMIN_PASS}
- GEOFENCING_SERVICE_SM_USER=${GEOFENCING_SERVICE_SM_USER}
- GEOFENCING_SERVICE_SM_PASS=${GEOFENCING_SERVICE_SM_PASS}
- BROKER_MGMT_USER=${BROKER_MGMT_USER}
- BROKER_MGMT_PASS=${BROKER_MGMT_PASS}
- BROKER_ADMIN_USER=${BROKER_ADMIN_USER}
- BROKER_ADMIN_PASS=${BROKER_ADMIN_PASS}
volumes:
- ./secrets/rabbitmq/ca_certificate.pem:/secrets/ca_certificate.pem
- ./services/subscription_manager/provision/config.yml:/app/provision/_config.yml
- ./services/subscription_manager/provision/entry.sh:/app/entry.sh
command: bash entry.sh
networks:
- backend
geofencing-service-provision:
image: geofencing-service
build: ./services/geofencing_service/src
container_name: geofencing_service_provision
depends_on:
- geofencing-db
environment:
- DB_NAME=geodb
- DB_USER=${GEOFENCING_DB_USER}
- DB_PASS=${GEOFENCING_DB_PASS}
- GEOFENCING_VIEWER_GS_USER=${GEOFENCING_VIEWER_GS_USER}
- GEOFENCING_VIEWER_GS_PASS=${GEOFENCING_VIEWER_GS_PASS}
volumes:
- ./services/geofencing_service/provision/config.yml:/app/provision/_config.yml
- ./services/geofencing_service/provision/uas_zones.json:/app/provision/uas_zones.json
- ./services/geofencing_service/provision/entry.sh:/app/entry.sh
- ./secrets/mongo/ca_certificate.pem:/secrets/mongo/ca_certificate.pem
command: bash entry.sh
networks:
- backend
geofencing-service:
image: geofencing-service
build: services/geofencing_service/src
container_name: geofencing_service
depends_on:
- subscription-manager
- geofencing-db
environment:
- DB_NAME=geodb
- DB_USER=${GEOFENCING_DB_USER}
- DB_PASS=${GEOFENCING_DB_PASS}
- GEOFENCING_SERVICE_SM_USER=${GEOFENCING_SERVICE_SM_USER}
- GEOFENCING_SERVICE_SM_PASS=${GEOFENCING_SERVICE_SM_PASS}
volumes:
- ./secrets/rabbitmq/client/:/secrets/broker/client
- ./secrets/rabbitmq/ca_certificate.pem:/secrets/broker/ca_certificate.pem
- ./secrets/nginx/ca_certificate.pem:/secrets/web_server/ca_certificate.pem
- ./secrets/mongo/ca_certificate.pem:/secrets/mongo/ca_certificate.pem
- ./services/geofencing_service/config.yml:/app/geofencing_service/_config.yml
- ./services/geofencing_service/entry.sh:/app/entry.sh
command: bash /app/entry.sh
networks:
- backend
geofencing-viewer:
image: geofencing-viewer
build: services/geofencing_viewer/src
container_name: geofencing_viewer
depends_on:
- geofencing-service
environment:
- GEOFENCING_VIEWER_BROKER_USER=${GEOFENCING_VIEWER_BROKER_USER}
- GEOFENCING_VIEWER_BROKER_PASS=${GEOFENCING_VIEWER_BROKER_PASS}
- GEOFENCING_VIEWER_GS_USER=${GEOFENCING_VIEWER_GS_USER}
- GEOFENCING_VIEWER_GS_PASS=${GEOFENCING_VIEWER_GS_PASS}
volumes:
- ./secrets/rabbitmq/client/:/secrets/broker/client
- ./secrets/rabbitmq/ca_certificate.pem:/secrets/broker/ca_certificate.pem
- ./secrets/nginx/ca_certificate.pem:/secrets/web_server/ca_certificate.pem
- ./services/geofencing_viewer/config.yml:/app/geofencing_viewer/_config.yml
- ./services/geofencing_viewer/entry.sh:/app/entry.sh
ports:
- 3000:3000
command: bash /app/entry.sh
networks:
- backend
networks:
backend:
driver: bridge
volumes:
sm-db-data:
driver: local
geofencing-db-data:
driver: local
geofencing-db-config:
driver: local
broker-data:
driver: local