-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
169 lines (154 loc) · 4.83 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
version: "3.5"
# TODO: pull images from docker hub
services:
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=${DB_USER}
- DB_PASS=${DB_PASS}
volumes:
- 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
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
- 5671:5671
volumes:
- broker-data:/var/lib/rabbitmq
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
networks:
- backend
subscription-manager:
image: subscription-manager
build: ./services/subscription_manager/src
container_name: subscription_manager
depends_on:
- db
- broker
environment:
- DB_NAME=smdb
- DB_USER=${DB_USER}
- DB_PASS=${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
- db
environment:
- DB_NAME=smdb
- SWIM_EXPLORER_BROKER_USER=${SWIM_EXPLORER_BROKER_USER}
- SWIM_EXPLORER_BROKER_PASS=${SWIM_EXPLORER_BROKER_PASS}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- SM_ADMIN_USER=${SM_ADMIN_USER}
- SM_ADMIN_PASS=${SM_ADMIN_PASS}
- SWIM_ADSB_SM_USER=${SWIM_ADSB_SM_USER}
- SWIM_ADSB_SM_PASS=${SWIM_ADSB_SM_PASS}
- SWIM_EXPLORER_SM_USER=${SWIM_EXPLORER_SM_USER}
- SWIM_EXPLORER_SM_PASS=${SWIM_EXPLORER_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
swim-adsb:
image: swim-adsb
build: ./services/swim_adsb/src
container_name: swim_adsb
depends_on:
- subscription-manager
- web-server
environment:
- SWIM_ADSB_SM_USER=${SWIM_ADSB_SM_USER}
- SWIM_ADSB_SM_PASS=${SWIM_ADSB_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
- ./services/swim_adsb/config.yml:/app/swim_adsb/_config.yml
- ./services/swim_adsb/entry.sh:/app/entry.sh
command: bash /app/entry.sh
networks:
- backend
swim-explorer:
image: swim-explorer
build: ./services/swim_explorer/src
container_name: swim_explorer
depends_on:
- subscription-manager
- web-server
- swim-adsb
environment:
- SWIM_EXPLORER_BROKER_USER=${SWIM_EXPLORER_BROKER_USER}
- SWIM_EXPLORER_BROKER_PASS=${SWIM_EXPLORER_BROKER_PASS}
- SWIM_EXPLORER_SM_USER=${SWIM_EXPLORER_SM_USER}
- SWIM_EXPLORER_SM_PASS=${SWIM_EXPLORER_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
- ./services/swim_explorer/config.yml:/app/swim_explorer/_config.yml
- ./services/swim_explorer/entry.sh:/app/entry.sh
ports:
- 3000:5000
command: bash /app/entry.sh
networks:
- backend
networks:
backend:
driver: bridge
volumes:
db-data:
driver: local
broker-data:
driver: local