@underpostnet/cyberia 3.2.80 → 3.2.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +34 -15
- package/.github/workflows/cyberia-client.cd.yml +13 -1
- package/.github/workflows/cyberia-server.cd.yml +13 -1
- package/.github/workflows/docker-image.cyberia-client.ci.yml +4 -4
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +4 -4
- package/.github/workflows/docker-image.cyberia-server.ci.yml +4 -4
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +4 -4
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +3 -3
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +3 -3
- package/.github/workflows/engine-cyberia.cd.yml +14 -3
- package/CHANGELOG.md +182 -1
- package/CLI-HELP.md +37 -16
- package/Dockerfile +1 -1
- package/Dockerfile.dev +1 -1
- package/Dockerfile.test +1 -1
- package/bin/cyberia.js +203 -49
- package/bin/deploy.js +18 -16
- package/bin/index.js +203 -49
- package/compose.env +34 -15
- package/deployment.yaml +1 -210
- package/docker-compose.yml +73 -62
- package/hardhat/package-lock.json +134 -126
- package/hardhat/package.json +2 -2
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +1 -210
- package/manifests/deployment/dd-cyberia-development/gateway.yaml +80 -0
- package/manifests/deployment/dd-cyberia-development/httproute.yaml +504 -0
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +12 -12
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +0 -82
- package/manifests/deployment/dd-cyberia-development/traffic-service.yaml +121 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/playwright/deployment.yaml +1 -1
- package/manifests/mongodb/kustomization.yaml +4 -1
- package/manifests/mongodb/statefulset.yaml +4 -0
- package/manifests/mongodb/storage-class.yaml +9 -2
- package/nginx.conf +86 -16
- package/package.json +2 -2
- package/proxy.yaml +12 -12
- package/pv-pvc.yaml +0 -82
- package/scripts/nat-iptables.sh +10 -4
- package/scripts/test-monitor.sh +4 -3
- package/src/api/cyberia-action/cyberia-action.model.js +1 -0
- package/src/api/cyberia-instance/cyberia-fallback-world.js +41 -14
- package/src/api/cyberia-instance/cyberia-instance-map.service.js +8 -12
- package/src/api/cyberia-instance/cyberia-portal-connector.js +7 -5
- package/src/api/cyberia-instance/cyberia-random-source.js +80 -0
- package/src/api/cyberia-instance/cyberia-world-generator.js +4 -3
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +73 -0
- package/src/cli/cluster.js +740 -55
- package/src/cli/db.js +2 -2
- package/src/cli/deploy.js +1679 -174
- package/src/cli/docker-compose.js +19 -178
- package/src/cli/image.js +15 -6
- package/src/cli/index.js +124 -35
- package/src/cli/ipfs.js +82 -11
- package/src/cli/monitor.js +1 -1
- package/src/cli/repository.js +1 -1
- package/src/cli/run.js +2161 -420
- package/src/cli/secrets.js +969 -0
- package/src/cli/ssh.js +8 -28
- package/src/client/components/cyberia/InstanceSelectionView.js +11 -8
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +5 -0
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +106 -39
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +18 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +44 -7
- package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +1 -1
- package/src/client-builder/client-build.js +94 -11
- package/src/client-builder/ssr.js +27 -73
- package/src/db/mongo/MongoBootstrap.js +295 -54
- package/src/db/mongo/MongooseDB.js +47 -32
- package/src/index.js +1 -1
- package/src/projects/cyberia/besu-genesis-generator.js +3 -2
- package/src/projects/cyberia/hot-reload-trigger.js +3 -3
- package/src/projects/cyberia/instance-data.js +42 -1
- package/src/runtime/cyberia-client/Dockerfile +1 -1
- package/src/runtime/cyberia-client/Dockerfile.dev +1 -1
- package/src/runtime/cyberia-server/Dockerfile +1 -1
- package/src/runtime/cyberia-server/Dockerfile.dev +1 -1
- package/src/runtime/engine-cyberia/Dockerfile +1 -1
- package/src/runtime/engine-cyberia/Dockerfile.dev +1 -1
- package/src/runtime/engine-cyberia/Dockerfile.test +1 -1
- package/src/runtime/engine-cyberia/compose.env +34 -15
- package/src/runtime/engine-cyberia/docker-compose.yml +73 -62
- package/src/runtime/engine-cyberia/nginx.conf +86 -16
- package/src/server/conf.js +1208 -70
- package/src/server/cri.js +70 -0
- package/src/server/underpost-gateway.js +1073 -0
- package/src/server/underpost-ingress.js +364 -0
- package/test/cluster-instances.test.js +435 -0
- package/test/deploy-node-placement.test.js +45 -0
- package/test/instance-traffic-plan.test.js +710 -0
- package/test/sops-secret-store.test.js +612 -0
- package/test/underpost-gateway.test.js +469 -0
- package/test/underpost-ingress.test.js +253 -0
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
# engine-private/conf/dd-cyberia/docker-compose/cyberia/
|
|
9
9
|
# ├── docker-compose.yml (this file — the ENTIRE stack, single source)
|
|
10
10
|
# ├── compose.env (working env-file, used as-is — not generated)
|
|
11
|
-
# ├── nginx.conf (
|
|
12
|
-
# └── mongodb/entrypoint.sh (
|
|
11
|
+
# ├── nginx.conf (custom per-variant sub-path routing)
|
|
12
|
+
# └── mongodb/entrypoint.sh (replica-set bootstrap)
|
|
13
13
|
# All bind mounts below are relative to this directory: the CLI runs compose with
|
|
14
14
|
# `--project-directory` pinned here (see src/cli/docker-compose.js).
|
|
15
15
|
#
|
|
16
16
|
# Multi-instance: one engine-cyberia (content + asset authority) feeds three
|
|
17
17
|
# cyberia-server + three cyberia-client tiers, one per conf.instances.json
|
|
18
18
|
# multiInstance variant (amethyst-strata-expansion "/", FOREST "/FOREST",
|
|
19
|
-
# TEST "/TEST").
|
|
20
|
-
#
|
|
19
|
+
# TEST "/TEST"). This custom workflow owns nginx.conf and the services below;
|
|
20
|
+
# keep both in sync when its instance topology changes.
|
|
21
21
|
#
|
|
22
|
-
# Startup is a strict health-gated chain
|
|
23
|
-
#
|
|
24
|
-
# mongodb + valkey
|
|
22
|
+
# Startup is a strict health-gated chain: the stable gateway starts after the
|
|
23
|
+
# engine, then each server/client pipeline advances independently:
|
|
24
|
+
# mongodb + valkey -> engine runtime -> proxy -> 3x server -> 3x client
|
|
25
25
|
#
|
|
26
26
|
# Architecture boundaries (see CLAUDE.md "Cyberia architecture boundaries"):
|
|
27
27
|
# engine-cyberia — content, validation, persistence, gRPC(:50051)+REST(:4005)
|
|
@@ -42,8 +42,8 @@ services:
|
|
|
42
42
|
|
|
43
43
|
# --- MongoDB -------------------------------------------------------------
|
|
44
44
|
# replSet rs0, keyFile cluster auth, replica-set + root-user init over the
|
|
45
|
-
# loopback localhost exception.
|
|
46
|
-
#
|
|
45
|
+
# loopback localhost exception. This custom workflow owns the mounted
|
|
46
|
+
# ./mongodb/entrypoint.sh bootstrap script.
|
|
47
47
|
mongodb:
|
|
48
48
|
image: ${MONGO_IMAGE:-mongo:latest}
|
|
49
49
|
container_name: dd-cyberia-mongodb
|
|
@@ -164,8 +164,8 @@ services:
|
|
|
164
164
|
# variant that has local content (amethyst + FOREST; TEST has none yet, so its
|
|
165
165
|
# server starts but rejects connections until seeded). Serves REST/WS on 4005
|
|
166
166
|
# and the engine gRPC data service on 50051.
|
|
167
|
-
engine-cyberia:
|
|
168
|
-
image: ${ENGINE_CYBERIA_IMAGE:-underpost/engine-cyberia-dev}:${ENGINE_CYBERIA_TAG:-v3.2.
|
|
167
|
+
engine-cyberia-runtime:
|
|
168
|
+
image: ${ENGINE_CYBERIA_IMAGE:-underpost/engine-cyberia-dev}:${ENGINE_CYBERIA_TAG:-v3.2.90}
|
|
169
169
|
container_name: dd-cyberia-engine
|
|
170
170
|
command:
|
|
171
171
|
- /bin/sh
|
|
@@ -213,19 +213,21 @@ services:
|
|
|
213
213
|
restart: unless-stopped
|
|
214
214
|
|
|
215
215
|
# === Tier 3: authoritative simulation, one per variant ===================
|
|
216
|
-
# All three share engine-cyberia (content + gRPC) and differ
|
|
217
|
-
#
|
|
218
|
-
#
|
|
219
|
-
#
|
|
216
|
+
# All three share engine-cyberia (content + gRPC) and differ by INSTANCE_CODE
|
|
217
|
+
# and CYBERIA_BASE_PATH. Each server owns its public path and waits for the
|
|
218
|
+
# stable gateway, which itself waits for the engine runtime to be healthy.
|
|
219
|
+
# All variants are internal-only. The proxy publishes a dedicated server
|
|
220
|
+
# gateway on host port 8081, so one port can route every instance path.
|
|
220
221
|
|
|
221
|
-
cyberia-server:
|
|
222
|
-
image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.
|
|
222
|
+
cyberia-server-runtime:
|
|
223
|
+
image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.90}
|
|
223
224
|
container_name: dd-cyberia-server
|
|
224
225
|
environment:
|
|
225
226
|
INSTANCE_CODE: amethyst-strata-expansion
|
|
226
|
-
|
|
227
|
+
CYBERIA_BASE_PATH: /
|
|
228
|
+
ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia}
|
|
227
229
|
ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
|
|
228
|
-
ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
|
|
230
|
+
ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia-runtime:50051}
|
|
229
231
|
ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
|
|
230
232
|
STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
|
|
231
233
|
APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
|
|
@@ -234,27 +236,26 @@ services:
|
|
|
234
236
|
- dd-cyberia-internal
|
|
235
237
|
expose:
|
|
236
238
|
- '8081'
|
|
237
|
-
ports:
|
|
238
|
-
- '${CYBERIA_SERVER_PORT:-8081}:8081'
|
|
239
239
|
healthcheck:
|
|
240
|
-
test: ['CMD-SHELL',
|
|
240
|
+
test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/api/v1/health/ready >/dev/null || exit 1']
|
|
241
241
|
interval: 15s
|
|
242
242
|
timeout: 5s
|
|
243
243
|
retries: 5
|
|
244
244
|
start_period: 30s
|
|
245
245
|
depends_on:
|
|
246
|
-
|
|
246
|
+
proxy:
|
|
247
247
|
condition: service_healthy
|
|
248
248
|
restart: unless-stopped
|
|
249
249
|
|
|
250
250
|
cyberia-server-forest:
|
|
251
|
-
image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.
|
|
251
|
+
image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.90}
|
|
252
252
|
container_name: dd-cyberia-server-forest
|
|
253
253
|
environment:
|
|
254
254
|
INSTANCE_CODE: FOREST
|
|
255
|
-
|
|
255
|
+
CYBERIA_BASE_PATH: /FOREST
|
|
256
|
+
ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia}
|
|
256
257
|
ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
|
|
257
|
-
ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
|
|
258
|
+
ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia-runtime:50051}
|
|
258
259
|
ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
|
|
259
260
|
STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
|
|
260
261
|
APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
|
|
@@ -264,24 +265,25 @@ services:
|
|
|
264
265
|
expose:
|
|
265
266
|
- '8081'
|
|
266
267
|
healthcheck:
|
|
267
|
-
test: ['CMD-SHELL',
|
|
268
|
+
test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/FOREST/api/v1/health/ready >/dev/null || exit 1']
|
|
268
269
|
interval: 15s
|
|
269
270
|
timeout: 5s
|
|
270
271
|
retries: 5
|
|
271
272
|
start_period: 30s
|
|
272
273
|
depends_on:
|
|
273
|
-
|
|
274
|
+
proxy:
|
|
274
275
|
condition: service_healthy
|
|
275
276
|
restart: unless-stopped
|
|
276
277
|
|
|
277
278
|
cyberia-server-test:
|
|
278
|
-
image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.
|
|
279
|
+
image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.90}
|
|
279
280
|
container_name: dd-cyberia-server-test
|
|
280
281
|
environment:
|
|
281
282
|
INSTANCE_CODE: TEST
|
|
282
|
-
|
|
283
|
+
CYBERIA_BASE_PATH: /TEST
|
|
284
|
+
ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia}
|
|
283
285
|
ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
|
|
284
|
-
ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
|
|
286
|
+
ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia-runtime:50051}
|
|
285
287
|
ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
|
|
286
288
|
STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
|
|
287
289
|
APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
|
|
@@ -291,69 +293,68 @@ services:
|
|
|
291
293
|
expose:
|
|
292
294
|
- '8081'
|
|
293
295
|
healthcheck:
|
|
294
|
-
test: ['CMD-SHELL',
|
|
296
|
+
test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/TEST/api/v1/health/ready >/dev/null || exit 1']
|
|
295
297
|
interval: 15s
|
|
296
298
|
timeout: 5s
|
|
297
299
|
retries: 5
|
|
298
300
|
start_period: 30s
|
|
299
301
|
depends_on:
|
|
300
|
-
|
|
302
|
+
proxy:
|
|
301
303
|
condition: service_healthy
|
|
302
304
|
restart: unless-stopped
|
|
303
305
|
|
|
304
306
|
# === Tier 4: presentation, one per variant ===============================
|
|
305
307
|
# One WASM bundle serves every variant; the instance is resolved from the URL
|
|
306
|
-
# sub-path (docker-driver injects
|
|
307
|
-
# _DEFAULT_INSTANCE). Each client waits ONLY for its own
|
|
308
|
+
# sub-path (docker-driver injects CYBERIA_BASE_PATH / _WS_ORIGIN /
|
|
309
|
+
# _ENGINE_API_ORIGIN / _DEFAULT_INSTANCE). Each client waits ONLY for its own
|
|
310
|
+
# server, so the three
|
|
308
311
|
# server->client pipelines advance independently (in parallel) once the shared
|
|
309
312
|
# engine-cyberia is healthy:
|
|
310
313
|
# cyberia-server -> cyberia-client
|
|
311
314
|
# cyberia-server-forest -> cyberia-client-forest
|
|
312
315
|
# cyberia-server-test -> cyberia-client-test
|
|
313
316
|
|
|
314
|
-
cyberia-client:
|
|
315
|
-
image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.
|
|
317
|
+
cyberia-client-runtime:
|
|
318
|
+
image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.90}
|
|
316
319
|
container_name: dd-cyberia-client
|
|
317
320
|
environment:
|
|
318
321
|
CYBERIA_PORT: '8081'
|
|
319
322
|
CYBERIA_INSTANCE_CODE: amethyst-strata-expansion
|
|
320
323
|
CYBERIA_BASE_PATH: /
|
|
321
324
|
CYBERIA_DEFAULT_INSTANCE: ${CYBERIA_DEFAULT_INSTANCE:-amethyst-strata-expansion}
|
|
322
|
-
CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://
|
|
323
|
-
CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://
|
|
325
|
+
CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://localhost:8081}
|
|
326
|
+
CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://localhost}
|
|
324
327
|
networks:
|
|
325
328
|
- dd-cyberia-internal
|
|
326
329
|
expose:
|
|
327
330
|
- '8081'
|
|
328
|
-
ports:
|
|
329
|
-
- '${CYBERIA_CLIENT_PORT:-8082}:8081'
|
|
330
331
|
healthcheck:
|
|
331
|
-
test: ['CMD-SHELL',
|
|
332
|
+
test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/ >/dev/null || exit 1']
|
|
332
333
|
interval: 15s
|
|
333
334
|
timeout: 5s
|
|
334
335
|
retries: 5
|
|
335
336
|
start_period: 20s
|
|
336
337
|
depends_on:
|
|
337
|
-
cyberia-server:
|
|
338
|
+
cyberia-server-runtime:
|
|
338
339
|
condition: service_healthy
|
|
339
340
|
restart: unless-stopped
|
|
340
341
|
|
|
341
342
|
cyberia-client-forest:
|
|
342
|
-
image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.
|
|
343
|
+
image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.90}
|
|
343
344
|
container_name: dd-cyberia-client-forest
|
|
344
345
|
environment:
|
|
345
346
|
CYBERIA_PORT: '8081'
|
|
346
347
|
CYBERIA_INSTANCE_CODE: FOREST
|
|
347
348
|
CYBERIA_BASE_PATH: /FOREST
|
|
348
349
|
CYBERIA_DEFAULT_INSTANCE: ${CYBERIA_DEFAULT_INSTANCE:-amethyst-strata-expansion}
|
|
349
|
-
CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://
|
|
350
|
-
CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://
|
|
350
|
+
CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://localhost:8081}
|
|
351
|
+
CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://localhost}
|
|
351
352
|
networks:
|
|
352
353
|
- dd-cyberia-internal
|
|
353
354
|
expose:
|
|
354
355
|
- '8081'
|
|
355
356
|
healthcheck:
|
|
356
|
-
test: ['CMD-SHELL',
|
|
357
|
+
test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/FOREST/ >/dev/null || exit 1']
|
|
357
358
|
interval: 15s
|
|
358
359
|
timeout: 5s
|
|
359
360
|
retries: 5
|
|
@@ -364,21 +365,21 @@ services:
|
|
|
364
365
|
restart: unless-stopped
|
|
365
366
|
|
|
366
367
|
cyberia-client-test:
|
|
367
|
-
image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.
|
|
368
|
+
image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.90}
|
|
368
369
|
container_name: dd-cyberia-client-test
|
|
369
370
|
environment:
|
|
370
371
|
CYBERIA_PORT: '8081'
|
|
371
372
|
CYBERIA_INSTANCE_CODE: TEST
|
|
372
373
|
CYBERIA_BASE_PATH: /TEST
|
|
373
374
|
CYBERIA_DEFAULT_INSTANCE: ${CYBERIA_DEFAULT_INSTANCE:-amethyst-strata-expansion}
|
|
374
|
-
CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://
|
|
375
|
-
CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://
|
|
375
|
+
CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://localhost:8081}
|
|
376
|
+
CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://localhost}
|
|
376
377
|
networks:
|
|
377
378
|
- dd-cyberia-internal
|
|
378
379
|
expose:
|
|
379
380
|
- '8081'
|
|
380
381
|
healthcheck:
|
|
381
|
-
test: ['CMD-SHELL',
|
|
382
|
+
test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/TEST/ >/dev/null || exit 1']
|
|
382
383
|
interval: 15s
|
|
383
384
|
timeout: 5s
|
|
384
385
|
retries: 5
|
|
@@ -388,31 +389,41 @@ services:
|
|
|
388
389
|
condition: service_healthy
|
|
389
390
|
restart: unless-stopped
|
|
390
391
|
|
|
391
|
-
# ===
|
|
392
|
-
# Routes
|
|
393
|
-
# websocket upgrade. Config source of truth: ./nginx.conf
|
|
394
|
-
#
|
|
392
|
+
# === Stable HTTP gateway =================================================
|
|
393
|
+
# Routes stable Docker DNS names and localhost paths to their per-variant
|
|
394
|
+
# upstreams with websocket upgrade. Config source of truth: ./nginx.conf,
|
|
395
|
+
# maintained by this custom workflow. Ports 80 and 8082 serve the multi-path
|
|
396
|
+
# client gateway; port 8081 is the multi-path server gateway. It starts as
|
|
397
|
+
# soon as the engine is healthy so server startup can safely use the stable
|
|
398
|
+
# engine-cyberia HTTP alias. Client/server upstreams resolve lazily as their
|
|
399
|
+
# independently health-gated pipelines become available.
|
|
395
400
|
proxy:
|
|
396
401
|
image: ${PROXY_IMAGE:-nginx:stable-alpine}
|
|
397
402
|
container_name: dd-cyberia-proxy
|
|
398
403
|
volumes:
|
|
399
404
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
400
405
|
networks:
|
|
401
|
-
|
|
406
|
+
dd-cyberia-internal:
|
|
407
|
+
aliases:
|
|
408
|
+
- cyberia-client
|
|
409
|
+
- cyberia-server
|
|
410
|
+
- engine-cyberia
|
|
402
411
|
ports:
|
|
403
412
|
- '${PROXY_HTTP_PORT:-80}:80'
|
|
413
|
+
- '${CYBERIA_SERVER_PORT:-8081}:8081'
|
|
414
|
+
- '${CYBERIA_CLIENT_PORT:-8082}:80'
|
|
404
415
|
healthcheck:
|
|
405
|
-
test:
|
|
416
|
+
test:
|
|
417
|
+
- CMD-SHELL
|
|
418
|
+
- >-
|
|
419
|
+
wget -q -O /dev/null http://127.0.0.1/healthz &&
|
|
420
|
+
wget -q -O /dev/null http://127.0.0.1:8081/healthz
|
|
406
421
|
interval: 15s
|
|
407
422
|
timeout: 5s
|
|
408
423
|
retries: 5
|
|
409
424
|
start_period: 10s
|
|
410
425
|
depends_on:
|
|
411
|
-
cyberia-
|
|
412
|
-
condition: service_healthy
|
|
413
|
-
cyberia-client-forest:
|
|
414
|
-
condition: service_healthy
|
|
415
|
-
cyberia-client-test:
|
|
426
|
+
engine-cyberia-runtime:
|
|
416
427
|
condition: service_healthy
|
|
417
428
|
restart: unless-stopped
|
|
418
429
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# http://localhost/<PATH
|
|
5
|
-
#
|
|
1
|
+
# Canonical routing for the dd-cyberia custom Compose workflow. This file is
|
|
2
|
+
# maintained here and is used as-is by the generic Docker Compose CLI.
|
|
3
|
+
# Docker DNS: http://cyberia-client, http://cyberia-server, http://engine-cyberia.
|
|
4
|
+
# Host access: client on http://localhost[:8082]/<PATH>, server on
|
|
5
|
+
# http://localhost:8081/<PATH>, and engine on http://localhost:4005.
|
|
6
|
+
# Optional *.cyberia.localhost aliases remain available.
|
|
6
7
|
|
|
7
8
|
map $http_upgrade $connection_upgrade {
|
|
8
9
|
default upgrade;
|
|
@@ -17,7 +18,7 @@ proxy_http_version 1.1;
|
|
|
17
18
|
|
|
18
19
|
server {
|
|
19
20
|
listen 80 default_server;
|
|
20
|
-
server_name localhost 127.0.0.1 _;
|
|
21
|
+
server_name localhost 127.0.0.1 cyberia-client cyberia.localhost client.cyberia.localhost _;
|
|
21
22
|
|
|
22
23
|
location = /healthz {
|
|
23
24
|
access_log off;
|
|
@@ -27,7 +28,7 @@ server {
|
|
|
27
28
|
|
|
28
29
|
# Shared content authority: REST API + engine-served assets (fonts, ui-icons).
|
|
29
30
|
location /api/ {
|
|
30
|
-
set $up_engine engine-cyberia:4005;
|
|
31
|
+
set $up_engine engine-cyberia-runtime:4005;
|
|
31
32
|
proxy_pass http://$up_engine;
|
|
32
33
|
proxy_set_header Host $host;
|
|
33
34
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -39,7 +40,7 @@ server {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
location /assets/ {
|
|
42
|
-
set $up_engine engine-cyberia:4005;
|
|
43
|
+
set $up_engine engine-cyberia-runtime:4005;
|
|
43
44
|
proxy_pass http://$up_engine;
|
|
44
45
|
proxy_set_header Host $host;
|
|
45
46
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -51,7 +52,7 @@ server {
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
location = /ws {
|
|
54
|
-
set $up_server_default cyberia-server:8081;
|
|
55
|
+
set $up_server_default cyberia-server-runtime:8081;
|
|
55
56
|
proxy_pass http://$up_server_default;
|
|
56
57
|
proxy_set_header Host $host;
|
|
57
58
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -62,9 +63,8 @@ server {
|
|
|
62
63
|
proxy_read_timeout 3600s;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
location /FOREST/ws {
|
|
66
|
+
location = /FOREST/ws {
|
|
66
67
|
set $up_server_forest cyberia-server-forest:8081;
|
|
67
|
-
rewrite ^/FOREST/(.*)$ /$1 break;
|
|
68
68
|
proxy_pass http://$up_server_forest;
|
|
69
69
|
proxy_set_header Host $host;
|
|
70
70
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -75,9 +75,8 @@ server {
|
|
|
75
75
|
proxy_read_timeout 3600s;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
location /TEST/ws {
|
|
78
|
+
location = /TEST/ws {
|
|
79
79
|
set $up_server_test cyberia-server-test:8081;
|
|
80
|
-
rewrite ^/TEST/(.*)$ /$1 break;
|
|
81
80
|
proxy_pass http://$up_server_test;
|
|
82
81
|
proxy_set_header Host $host;
|
|
83
82
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -89,7 +88,7 @@ server {
|
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
location / {
|
|
92
|
-
set $up_client_default cyberia-client:8081;
|
|
91
|
+
set $up_client_default cyberia-client-runtime:8081;
|
|
93
92
|
proxy_pass http://$up_client_default;
|
|
94
93
|
proxy_set_header Host $host;
|
|
95
94
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -101,7 +100,7 @@ server {
|
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
location = /FOREST { return 301 /FOREST/; }
|
|
104
|
-
location /FOREST {
|
|
103
|
+
location ^~ /FOREST/ {
|
|
105
104
|
set $up_client_forest cyberia-client-forest:8081;
|
|
106
105
|
proxy_pass http://$up_client_forest;
|
|
107
106
|
proxy_set_header Host $host;
|
|
@@ -114,7 +113,7 @@ server {
|
|
|
114
113
|
}
|
|
115
114
|
|
|
116
115
|
location = /TEST { return 301 /TEST/; }
|
|
117
|
-
location /TEST {
|
|
116
|
+
location ^~ /TEST/ {
|
|
118
117
|
set $up_client_test cyberia-client-test:8081;
|
|
119
118
|
proxy_pass http://$up_client_test;
|
|
120
119
|
proxy_set_header Host $host;
|
|
@@ -126,3 +125,74 @@ server {
|
|
|
126
125
|
proxy_read_timeout 3600s;
|
|
127
126
|
}
|
|
128
127
|
}
|
|
128
|
+
|
|
129
|
+
# Dedicated Cyberia server gateway. Port 8081 makes all instance paths available
|
|
130
|
+
# from localhost; the stable Docker DNS alias exposes the same routes on :80.
|
|
131
|
+
server {
|
|
132
|
+
listen 80;
|
|
133
|
+
listen 8081 default_server;
|
|
134
|
+
server_name cyberia-server server.cyberia.localhost;
|
|
135
|
+
|
|
136
|
+
location = /healthz {
|
|
137
|
+
access_log off;
|
|
138
|
+
return 200 "ok\n";
|
|
139
|
+
add_header Content-Type text/plain;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
location = /FOREST { return 301 /FOREST/; }
|
|
143
|
+
location ^~ /FOREST/ {
|
|
144
|
+
set $up_http_server_forest cyberia-server-forest:8081;
|
|
145
|
+
proxy_pass http://$up_http_server_forest;
|
|
146
|
+
proxy_set_header Host $host;
|
|
147
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
148
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
149
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
150
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
151
|
+
proxy_set_header Connection $connection_upgrade;
|
|
152
|
+
proxy_read_timeout 3600s;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
location = /TEST { return 301 /TEST/; }
|
|
156
|
+
location ^~ /TEST/ {
|
|
157
|
+
set $up_http_server_test cyberia-server-test:8081;
|
|
158
|
+
proxy_pass http://$up_http_server_test;
|
|
159
|
+
proxy_set_header Host $host;
|
|
160
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
161
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
162
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
163
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
164
|
+
proxy_set_header Connection $connection_upgrade;
|
|
165
|
+
proxy_read_timeout 3600s;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
location / {
|
|
169
|
+
set $up_http_server_default cyberia-server-runtime:8081;
|
|
170
|
+
proxy_pass http://$up_http_server_default;
|
|
171
|
+
proxy_set_header Host $host;
|
|
172
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
173
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
174
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
175
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
176
|
+
proxy_set_header Connection $connection_upgrade;
|
|
177
|
+
proxy_read_timeout 3600s;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
# The engine remains a single shared authority. Its direct :4005 publication is
|
|
182
|
+
# canonical for debugging; this alias is convenient for browser parity.
|
|
183
|
+
server {
|
|
184
|
+
listen 80;
|
|
185
|
+
server_name engine-cyberia engine.cyberia.localhost;
|
|
186
|
+
|
|
187
|
+
location / {
|
|
188
|
+
set $up_engine_authority engine-cyberia-runtime:4005;
|
|
189
|
+
proxy_pass http://$up_engine_authority;
|
|
190
|
+
proxy_set_header Host $host;
|
|
191
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
192
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
193
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
194
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
195
|
+
proxy_set_header Connection $connection_upgrade;
|
|
196
|
+
proxy_read_timeout 3600s;
|
|
197
|
+
}
|
|
198
|
+
}
|