-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathcompose.yaml
More file actions
333 lines (321 loc) · 11.1 KB
/
compose.yaml
File metadata and controls
333 lines (321 loc) · 11.1 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
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# encoding: ascii-8bit
# Copyright 2022 Ball Aerospace & Technologies Corp.
# All Rights Reserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE.md for more details.
# Modified by OpenC3, Inc.
# All changes Copyright 2026, OpenC3, Inc.
# All Rights Reserved
#
# This file may also be used under the terms of a commercial license
# if purchased from OpenC3, Inc.
services:
openc3-buckets:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-buckets${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
volumes:
- "openc3-object-v:/data"
- "./cacert.pem:/devel/cacert.pem:z"
restart: "unless-stopped"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
ROOT_ACCESS_KEY: "${OPENC3_BUCKET_USERNAME}"
ROOT_SECRET_KEY: "${OPENC3_BUCKET_PASSWORD}"
OPENC3_SR_BUCKET_USERNAME: "${OPENC3_SR_BUCKET_USERNAME}"
OPENC3_SR_BUCKET_PASSWORD: "${OPENC3_SR_BUCKET_PASSWORD}"
SSL_CERT_FILE: "/devel/cacert.pem"
CURL_CA_BUNDLE: "/devel/cacert.pem"
REQUESTS_CA_BUNDLE: "/devel/cacert.pem"
NODE_EXTRA_CA_CERTS: "/devel/cacert.pem"
healthcheck:
# Test that S3-compatible storage (versitygw) is listening on port 9000
test: ["CMD-SHELL", "nc -z 127.0.0.1 9000 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
openc3-tsdb:
read_only: true
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-tsdb${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
platform: "${OPENC3_TSDB_PLATFORM:-}"
# ports:
# # This gives complete access to the QuestDB instance, which is useful for testing and development.
# - "127.0.0.1:9000:9000" # OPENC3_TSDB_INGEST_PORT & QuestDB Console
# - "127.0.0.1:9003:9003" # QuestDB health endpoint
# # The Postgresql port doesn't typically need to be exposed to the host
# # but if you have external software that needs to connect to QuestDB
# # you can uncomment the following line to expose it.
# - "127.0.0.1:8812:8812" # OPENC3_TSDB_QUERY_PORT
volumes:
- "openc3-tsdb-v:/var/lib/questdb"
restart: "unless-stopped"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
QDB_PG_USER: "${OPENC3_TSDB_USERNAME}"
QDB_PG_PASSWORD: "${OPENC3_TSDB_PASSWORD}"
QDB_HTTP_USER: "${OPENC3_TSDB_USERNAME}"
QDB_HTTP_PASSWORD: "${OPENC3_TSDB_PASSWORD}"
ulimits:
# Set 'nofile' with different soft and hard limits
nofile:
soft: 1048576
hard: 1048576
# Set 'memlock' to unlimited using -1
memlock:
soft: -1
hard: -1
healthcheck:
# Test that QuestDB can actually execute queries via the REST API
# This verifies both the HTTP server and the database engine are working
test:
[
"CMD-SHELL",
'curl -f -u "$${QDB_HTTP_USER}:$${QDB_HTTP_PASSWORD}" ''http://localhost:9000/exec?query=SELECT+1'' | grep -q ''"query":"SELECT 1"'' || exit 1',
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
openc3-redis:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-redis${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
volumes:
- "openc3-redis-v:/data"
- "./cacert.pem:/devel/cacert.pem:z"
- "./openc3-redis/users.acl:/config/users.acl:z"
restart: "unless-stopped"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
SSL_CERT_FILE: "/devel/cacert.pem"
CURL_CA_BUNDLE: "/devel/cacert.pem"
REQUESTS_CA_BUNDLE: "/devel/cacert.pem"
NODE_EXTRA_CA_CERTS: "/devel/cacert.pem"
healthcheck:
# Test Redis with PING command - use default connection (no auth in healthcheck)
# Redis will respond with NOAUTH if it's running, which is sufficient for health
test:
["CMD-SHELL", "redis-cli ping 2>&1 | grep -E 'PONG|NOAUTH' || exit 1"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
openc3-redis-ephemeral:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-redis${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
volumes:
- "openc3-redis-ephemeral-v:/data"
- "./cacert.pem:/devel/cacert.pem:z"
- "./openc3-redis/users.acl:/config/users.acl:z"
restart: "unless-stopped"
command: ["redis-server", "/config/redis_ephemeral.conf"]
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
SSL_CERT_FILE: "/devel/cacert.pem"
CURL_CA_BUNDLE: "/devel/cacert.pem"
REQUESTS_CA_BUNDLE: "/devel/cacert.pem"
NODE_EXTRA_CA_CERTS: "/devel/cacert.pem"
healthcheck:
# Test ephemeral Redis with PING command on port 6380
# Redis will respond with NOAUTH if it's running, which is sufficient for health
test:
[
"CMD-SHELL",
"redis-cli -p 6380 ping 2>&1 | grep -E 'PONG|NOAUTH' || exit 1",
]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
openc3-cosmos-cmd-tlm-api:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-cosmos-cmd-tlm-api${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
restart: "unless-stopped"
depends_on:
- "openc3-redis"
- "openc3-redis-ephemeral"
- "openc3-buckets"
volumes:
- "openc3-cmd-tlm-api-tmp-v:/tmp"
- "openc3-gems-v:/gems"
- "./plugins:/plugins:z"
- "./cacert.pem:/devel/cacert.pem:z"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
RAILS_ENV: "production"
GEM_HOME: "/gems"
PYTHONUSERBASE: "/gems/python_packages"
ANYCABLE_REDIS_URL: "redis://${OPENC3_REDIS_USERNAME}:${OPENC3_REDIS_PASSWORD}@${OPENC3_REDIS_HOSTNAME}:${OPENC3_REDIS_PORT}"
env_file:
- .env
extra_hosts:
- host.docker.internal:host-gateway
openc3-cosmos-script-runner-api:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-cosmos-script-runner-api${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
restart: "unless-stopped"
depends_on:
- "openc3-redis"
- "openc3-redis-ephemeral"
- "openc3-buckets"
volumes:
- "openc3-script-runner-api-tmp-v:/tmp"
- "openc3-gems-v:/gems:ro"
- "./plugins:/plugins:z"
- "./cacert.pem:/devel/cacert.pem:z"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
RAILS_ENV: "production"
GEM_HOME: "/gems"
PYTHONUSERBASE: "/gems/python_packages"
ANYCABLE_REDIS_URL: "redis://${OPENC3_REDIS_USERNAME}:${OPENC3_REDIS_PASSWORD}@${OPENC3_REDIS_HOSTNAME}:${OPENC3_REDIS_PORT}"
env_file:
- .env
openc3-operator:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-operator${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
restart: "unless-stopped"
# ports:
# - "127.0.0.1:7779:7779" # Open port for the demo router
# - "127.0.0.1:8081:8081/udp" # Open a udp port
depends_on:
- "openc3-redis"
- "openc3-redis-ephemeral"
- "openc3-buckets"
volumes:
- "openc3-operator-tmp-v:/tmp"
- "openc3-gems-v:/gems:ro"
- "./plugins:/plugins:z"
- "./cacert.pem:/devel/cacert.pem:z"
# Add access to the entire C drive on Windows
# - "/c:/c"
# Create a dropbox and archive folder for ingest by FileInterface and PreidentifiedRouter
# - /Users/jmthomas/dropbox:/dropbox
# - /Users/jmthomas/archive:/archive
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
# CI is set in Github actions, changes the Demo TLM_LOG_CYCLE_TIME
# List syntax passes through host CI only if set, omits it otherwise
- CI
- GEM_HOME=/gems
- PYTHONUSERBASE=/gems/python_packages
env_file:
- .env
extra_hosts:
- host.docker.internal:host-gateway
openc3-traefik:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-traefik${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
volumes:
- "./cacert.pem:/devel/cacert.pem:z"
- "./openc3-traefik/traefik.yaml:/etc/traefik/traefik.yaml:z"
# To allow HTTP, uncomment OPENC3_ALLOW_HTTP in .env
# - "./openc3-traefik/traefik-ssl.yaml:/etc/traefik/traefik.yaml:z"
# - "./openc3-traefik/traefik-letsencrypt.yaml:/etc/traefik/traefik.yaml:z"
# - "./openc3-traefik/cert.key:/etc/traefik/cert.key:z"
# - "./openc3-traefik/cert.crt:/etc/traefik/cert.crt:z"
ports:
- "127.0.0.1:2900:2900"
- "127.0.0.1:2943:2943"
# - "80:2900"
# - "443:2943"
restart: "unless-stopped"
depends_on:
- "openc3-redis"
- "openc3-redis-ephemeral"
- "openc3-buckets"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
OPENC3_TOOLS_BUCKET: "${OPENC3_TOOLS_BUCKET}"
OPENC3_BUCKET_URL: "${OPENC3_BUCKET_URL}"
OPENC3_ALLOW_HTTP: "${OPENC3_ALLOW_HTTP:-}"
SSL_CERT_FILE: "/devel/cacert.pem"
CURL_CA_BUNDLE: "/devel/cacert.pem"
REQUESTS_CA_BUNDLE: "/devel/cacert.pem"
NODE_EXTRA_CA_CERTS: "/devel/cacert.pem"
healthcheck:
# Use traefik's built-in healthcheck which uses the ping entrypoint
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
openc3-cosmos-init:
read_only: true
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-cosmos-init${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
restart: on-failure
depends_on:
- "openc3-traefik"
- "openc3-redis"
- "openc3-redis-ephemeral"
- "openc3-buckets"
volumes:
- "openc3-init-tmp-v:/tmp"
- "openc3-gems-v:/gems"
- "./plugins:/plugins:z"
- "./cacert.pem:/devel/cacert.pem:z"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
# CI is set in Github actions, changes the Demo TLM_LOG_CYCLE_TIME
# List syntax passes through host CI only if set, omits it otherwise
- CI
- GEM_HOME=/gems
- PYTHONUSERBASE=/gems/python_packages
env_file:
- .env
volumes:
openc3-tsdb-v: {}
openc3-redis-v: {}
openc3-redis-ephemeral-v: {}
openc3-object-v: {}
openc3-gems-v: {}
openc3-cmd-tlm-api-tmp-v: {}
openc3-script-runner-api-tmp-v: {}
openc3-operator-tmp-v: {}
openc3-init-tmp-v: {}