forked from brian7704/OpenTAKServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
188 lines (176 loc) · 5.07 KB
/
docker-compose.yaml
File metadata and controls
188 lines (176 loc) · 5.07 KB
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
# docker compose file for server side deps
services:
###################
# INFRA DEPS #
###################
rabbitmq:
image: rabbitmq:3.13-management
container_name: rabbitmq
restart: unless-stopped
ports:
- "5672:5672" # AMQP
- "15672:15672" # Management UI
- "1883:1883" # MQTT
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbit mqtt.listeners.tcp.default=1883"
RABBITMQ_ENABLED_PLUGINS_FILE: /etc/rabbitmq/enabled_plugins
# enable the management UI
command: >
bash -c "echo '[rabbitmq_management, rabbitmq_mqtt].' > /etc/rabbitmq/enabled_plugins &&
rabbitmq-server"
volumes:
- rabbitmq-data:/var/lib/rabbitmq
- rabbitmq-etc:/etc/rabbitmq
healthcheck:
test: ["CMD-SHELL", "rabbitmq-diagnostics -q ping"]
interval: 30s
timeout: 30s
retries: 3
ots-db:
image: postgis/postgis:18-3.6
container_name: ots-db
hostname: ots-db
restart: unless-stopped
env_file:
- .env.docker
volumes:
- ots-db-data:/var/lib/postgresql/
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 1s
timeout: 5s
retries: 10
ports:
- "5432:5432"
mediamtx:
image: bluenviron/mediamtx:1-ffmpeg
ports:
- 8554:8554
- 1935:1935
- 8888:8888
- 8889:8889
- 8890:8890/udp
- 8189:8189/udp
###################
# DEV TOOLS #
###################
aspire:
container_name: aspire
image: mcr.microsoft.com/dotnet/aspire-dashboard:latest
ports:
- "18888:18888" # Dashboard UI
- "4317:18889" # OTLP endpoint for receiving telemetry
###################
# OTS COMPONENTS #
###################
# http routing proxy, with mTLS auth for MartiAPI
proxy:
image: nginx:stable-alpine3.23
ports:
- "80:80" # web and api
- "443:443" # web and api
- "8080:8080" # web and api alt
- "8443:8443" # mTLS marti api
- "8446:8446" # mTLS cert enrolment
environment:
- OTS_SERVER_CERT=/opentakserver/ots/ca/certs/opentakserver/opentakserver.pem
- OTS_SERVER_KEY=/opentakserver/ots/ca/certs/opentakserver/opentakserver.nopass.key
- OTS_TRUSTED_CA_CERT=/opentakserver/ots/ca/ca-trusted.pem
- OTS_API_URL=http://opentakserver:8081
- OTS_UI_URL=http://ui:80
- MEDIAMTX_HOST=mediamtx
- RMQ_HOST=rabbitmq
volumes:
- ./pkg/config/nginx/mtls.conf.template:/etc/nginx/templates/mtls.conf.template # mtls MartiAPI
- ./pkg/config/nginx/cert-enrol.conf.template:/etc/nginx/templates/cert-enrol.conf.template # mTLS cert enrolment
- ./pkg/config/nginx/ots_api.conf.template:/etc/nginx/templates/ots_api.conf.template # web and api
# - ./pkg/config/nginx/rmq.conf.template:/etc/nginx/templates/rmq.conf.template # rabbitmq
# - ./pkg/config/nginx/mediamtx.conf.template:/etc/nginx/templates/mediamtx.conf.template # mediamtx
- ots_shared:/opentakserver
cot_parser:
build:
context: .
dockerfile: ./pkg/docker/Dockerfile.cot_parser
#TODO: image: ghcr.io/MMolineux/ots_cot_parser
container_name: cot_parser
restart: unless-stopped
env_file:
- .env.docker
environment:
- OTEL_SERVICE_NAME=cot_parser
depends_on:
rabbitmq:
condition: service_healthy
ots-db:
condition: service_healthy
opentakserver:
condition: service_healthy
volumes:
- ots_shared:/app/opentakserver/
eud_handler:
build:
context: .
dockerfile: ./pkg/docker/Dockerfile.eud_handler
#TODO: image: ghcr.io/MMolineux/ots_eud_handler
container_name: eud_handler
restart: unless-stopped
env_file:
- .env.docker
command:
- --ssl
environment:
- OTEL_SERVICE_NAME=eud_handler
ports:
- "8089:8089" # directly exposed TCP stream, no need for ingress control
depends_on:
rabbitmq:
condition: service_healthy
ots-db:
condition: service_healthy
opentakserver:
condition: service_healthy
volumes:
- ots_shared:/app/opentakserver/
opentakserver:
build:
context: .
dockerfile: ./pkg/docker/Dockerfile.ots
#TODO: image: ghcr.io/MMolineux/opentakserver
container_name: opentakserver
restart: unless-stopped
env_file:
- .env.docker
ports:
- "8081:8081"
depends_on:
rabbitmq:
condition: service_healthy
ots-db:
condition: service_healthy
healthcheck:
test:
["CMD-SHELL", "curl --fail http://localhost:8081/api/health || exit 1"]
interval: 2s
timeout: 10s
retries: 3
volumes:
- ots_shared:/app/opentakserver/
ui:
build:
context: .
dockerfile: ./pkg/docker/Dockerfile.ui
#TODO: image: ghcr.io/MMolineux/ots_ui
container_name: ui
restart: unless-stopped
ports:
- "80"
depends_on:
opentakserver:
condition: service_healthy
volumes:
rabbitmq-data:
rabbitmq-etc:
ots-db-data:
ots_shared: