@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.
Files changed (96) hide show
  1. package/.env.example +34 -15
  2. package/.github/workflows/cyberia-client.cd.yml +13 -1
  3. package/.github/workflows/cyberia-server.cd.yml +13 -1
  4. package/.github/workflows/docker-image.cyberia-client.ci.yml +4 -4
  5. package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +4 -4
  6. package/.github/workflows/docker-image.cyberia-server.ci.yml +4 -4
  7. package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +4 -4
  8. package/.github/workflows/docker-image.engine-cyberia.ci.yml +3 -3
  9. package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +3 -3
  10. package/.github/workflows/engine-cyberia.cd.yml +14 -3
  11. package/CHANGELOG.md +182 -1
  12. package/CLI-HELP.md +37 -16
  13. package/Dockerfile +1 -1
  14. package/Dockerfile.dev +1 -1
  15. package/Dockerfile.test +1 -1
  16. package/bin/cyberia.js +203 -49
  17. package/bin/deploy.js +18 -16
  18. package/bin/index.js +203 -49
  19. package/compose.env +34 -15
  20. package/deployment.yaml +1 -210
  21. package/docker-compose.yml +73 -62
  22. package/hardhat/package-lock.json +134 -126
  23. package/hardhat/package.json +2 -2
  24. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
  25. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
  26. package/manifests/deployment/dd-cyberia-development/deployment.yaml +1 -210
  27. package/manifests/deployment/dd-cyberia-development/gateway.yaml +80 -0
  28. package/manifests/deployment/dd-cyberia-development/httproute.yaml +504 -0
  29. package/manifests/deployment/dd-cyberia-development/proxy.yaml +12 -12
  30. package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +0 -82
  31. package/manifests/deployment/dd-cyberia-development/traffic-service.yaml +121 -0
  32. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  33. package/manifests/deployment/playwright/deployment.yaml +1 -1
  34. package/manifests/mongodb/kustomization.yaml +4 -1
  35. package/manifests/mongodb/statefulset.yaml +4 -0
  36. package/manifests/mongodb/storage-class.yaml +9 -2
  37. package/nginx.conf +86 -16
  38. package/package.json +2 -2
  39. package/proxy.yaml +12 -12
  40. package/pv-pvc.yaml +0 -82
  41. package/scripts/nat-iptables.sh +10 -4
  42. package/scripts/test-monitor.sh +4 -3
  43. package/src/api/cyberia-action/cyberia-action.model.js +1 -0
  44. package/src/api/cyberia-instance/cyberia-fallback-world.js +41 -14
  45. package/src/api/cyberia-instance/cyberia-instance-map.service.js +8 -12
  46. package/src/api/cyberia-instance/cyberia-portal-connector.js +7 -5
  47. package/src/api/cyberia-instance/cyberia-random-source.js +80 -0
  48. package/src/api/cyberia-instance/cyberia-world-generator.js +4 -3
  49. package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +73 -0
  50. package/src/cli/cluster.js +740 -55
  51. package/src/cli/db.js +2 -2
  52. package/src/cli/deploy.js +1679 -174
  53. package/src/cli/docker-compose.js +19 -178
  54. package/src/cli/image.js +15 -6
  55. package/src/cli/index.js +124 -35
  56. package/src/cli/ipfs.js +82 -11
  57. package/src/cli/monitor.js +1 -1
  58. package/src/cli/repository.js +1 -1
  59. package/src/cli/run.js +2161 -420
  60. package/src/cli/secrets.js +969 -0
  61. package/src/cli/ssh.js +8 -28
  62. package/src/client/components/cyberia/InstanceSelectionView.js +11 -8
  63. package/src/client/components/cyberia/SharedDefaultsCyberia.js +5 -0
  64. package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +106 -39
  65. package/src/client/public/cyberia-docs/ARCHITECTURE.md +18 -0
  66. package/src/client/public/cyberia-docs/CYBERIA-CLI.md +44 -7
  67. package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
  68. package/src/client/public/cyberia-docs/WHITE-PAPER.md +1 -1
  69. package/src/client-builder/client-build.js +94 -11
  70. package/src/client-builder/ssr.js +27 -73
  71. package/src/db/mongo/MongoBootstrap.js +295 -54
  72. package/src/db/mongo/MongooseDB.js +47 -32
  73. package/src/index.js +1 -1
  74. package/src/projects/cyberia/besu-genesis-generator.js +3 -2
  75. package/src/projects/cyberia/hot-reload-trigger.js +3 -3
  76. package/src/projects/cyberia/instance-data.js +42 -1
  77. package/src/runtime/cyberia-client/Dockerfile +1 -1
  78. package/src/runtime/cyberia-client/Dockerfile.dev +1 -1
  79. package/src/runtime/cyberia-server/Dockerfile +1 -1
  80. package/src/runtime/cyberia-server/Dockerfile.dev +1 -1
  81. package/src/runtime/engine-cyberia/Dockerfile +1 -1
  82. package/src/runtime/engine-cyberia/Dockerfile.dev +1 -1
  83. package/src/runtime/engine-cyberia/Dockerfile.test +1 -1
  84. package/src/runtime/engine-cyberia/compose.env +34 -15
  85. package/src/runtime/engine-cyberia/docker-compose.yml +73 -62
  86. package/src/runtime/engine-cyberia/nginx.conf +86 -16
  87. package/src/server/conf.js +1208 -70
  88. package/src/server/cri.js +70 -0
  89. package/src/server/underpost-gateway.js +1073 -0
  90. package/src/server/underpost-ingress.js +364 -0
  91. package/test/cluster-instances.test.js +435 -0
  92. package/test/deploy-node-placement.test.js +45 -0
  93. package/test/instance-traffic-plan.test.js +710 -0
  94. package/test/sops-secret-store.test.js +612 -0
  95. package/test/underpost-gateway.test.js +469 -0
  96. package/test/underpost-ingress.test.js +253 -0
package/deployment.yaml CHANGED
@@ -20,7 +20,7 @@ spec:
20
20
  spec:
21
21
  containers:
22
22
  - name: dd-cyberia-development-blue
23
- image: underpost/underpost-engine:v3.2.80
23
+ image: underpost/underpost-engine:v3.2.90
24
24
  imagePullPolicy: IfNotPresent
25
25
  envFrom:
26
26
  - secretRef:
@@ -207,212 +207,3 @@ spec:
207
207
  port: 4016
208
208
  targetPort: 4016
209
209
  type: LoadBalancer
210
- ---
211
- apiVersion: apps/v1
212
- kind: Deployment
213
- metadata:
214
- name: dd-cyberia-development-green
215
- namespace: default
216
- labels:
217
- app: dd-cyberia-development-green
218
- deploy-id: dd-cyberia-development
219
- spec:
220
- replicas: 1
221
- selector:
222
- matchLabels:
223
- app: dd-cyberia-development-green
224
- template:
225
- metadata:
226
- labels:
227
- app: dd-cyberia-development-green
228
- deploy-id: dd-cyberia-development
229
- spec:
230
- containers:
231
- - name: dd-cyberia-development-green
232
- image: underpost/underpost-engine:v3.2.80
233
- imagePullPolicy: IfNotPresent
234
- envFrom:
235
- - secretRef:
236
- name: underpost-config
237
- env:
238
- - name: UNDERPOST_INTERNAL_PORT
239
- value: "4004"
240
-
241
- command:
242
- - /bin/sh
243
- - -c
244
- - >
245
- underpost secret underpost --create-from-env &&
246
- underpost start --build --run dd-cyberia development
247
- readinessProbe:
248
- {
249
- "httpGet": {
250
- "path": "/_internal/ready",
251
- "port": 4004
252
- },
253
- "initialDelaySeconds": 5,
254
- "periodSeconds": 5,
255
- "timeoutSeconds": 3,
256
- "failureThreshold": 3
257
- }
258
- livenessProbe:
259
- {
260
- "httpGet": {
261
- "path": "/_internal/health",
262
- "port": 4004
263
- },
264
- "initialDelaySeconds": 30,
265
- "periodSeconds": 15,
266
- "timeoutSeconds": 3,
267
- "failureThreshold": 3
268
- }
269
- startupProbe:
270
- {
271
- "httpGet": {
272
- "path": "/_internal/ready",
273
- "port": 4004
274
- },
275
- "initialDelaySeconds": 10,
276
- "periodSeconds": 10,
277
- "timeoutSeconds": 3,
278
- "failureThreshold": 180
279
- }
280
-
281
-
282
-
283
- volumeMounts:
284
- - name: vol-public-dd-cyberia-dd-cyberia-development-green
285
- mountPath: /home/dd/engine/src/client/public/cyberia
286
-
287
- - name: vol-public-dd-cyberia-underpost-dd-cyberia-development-green
288
- mountPath: /home/dd/engine/src/client/public/underpost
289
-
290
- volumes:
291
- - name: vol-public-dd-cyberia-dd-cyberia-development-green
292
- persistentVolumeClaim:
293
- claimName: pvc-public-dd-cyberia-dd-cyberia-development-green
294
-
295
-
296
- - name: vol-public-dd-cyberia-underpost-dd-cyberia-development-green
297
- persistentVolumeClaim:
298
- claimName: pvc-public-dd-cyberia-underpost-dd-cyberia-development-green
299
-
300
-
301
- ---
302
- apiVersion: v1
303
- kind: Service
304
- metadata:
305
- name: dd-cyberia-development-green-service
306
- namespace: default
307
- spec:
308
- selector:
309
- app: dd-cyberia-development-green
310
- ports:
311
- - name: 'tcp-4005'
312
- protocol: TCP
313
- port: 4005
314
- targetPort: 4005
315
- - name: 'udp-4005'
316
- protocol: UDP
317
- port: 4005
318
- targetPort: 4005
319
-
320
- - name: 'tcp-4006'
321
- protocol: TCP
322
- port: 4006
323
- targetPort: 4006
324
- - name: 'udp-4006'
325
- protocol: UDP
326
- port: 4006
327
- targetPort: 4006
328
-
329
- - name: 'tcp-4007'
330
- protocol: TCP
331
- port: 4007
332
- targetPort: 4007
333
- - name: 'udp-4007'
334
- protocol: UDP
335
- port: 4007
336
- targetPort: 4007
337
-
338
- - name: 'tcp-4008'
339
- protocol: TCP
340
- port: 4008
341
- targetPort: 4008
342
- - name: 'udp-4008'
343
- protocol: UDP
344
- port: 4008
345
- targetPort: 4008
346
-
347
- - name: 'tcp-4009'
348
- protocol: TCP
349
- port: 4009
350
- targetPort: 4009
351
- - name: 'udp-4009'
352
- protocol: UDP
353
- port: 4009
354
- targetPort: 4009
355
-
356
- - name: 'tcp-4010'
357
- protocol: TCP
358
- port: 4010
359
- targetPort: 4010
360
- - name: 'udp-4010'
361
- protocol: UDP
362
- port: 4010
363
- targetPort: 4010
364
-
365
- - name: 'tcp-4011'
366
- protocol: TCP
367
- port: 4011
368
- targetPort: 4011
369
- - name: 'udp-4011'
370
- protocol: UDP
371
- port: 4011
372
- targetPort: 4011
373
-
374
- - name: 'tcp-4012'
375
- protocol: TCP
376
- port: 4012
377
- targetPort: 4012
378
- - name: 'udp-4012'
379
- protocol: UDP
380
- port: 4012
381
- targetPort: 4012
382
-
383
- - name: 'tcp-4013'
384
- protocol: TCP
385
- port: 4013
386
- targetPort: 4013
387
- - name: 'udp-4013'
388
- protocol: UDP
389
- port: 4013
390
- targetPort: 4013
391
-
392
- - name: 'tcp-4014'
393
- protocol: TCP
394
- port: 4014
395
- targetPort: 4014
396
- - name: 'udp-4014'
397
- protocol: UDP
398
- port: 4014
399
- targetPort: 4014
400
-
401
- - name: 'tcp-4015'
402
- protocol: TCP
403
- port: 4015
404
- targetPort: 4015
405
- - name: 'udp-4015'
406
- protocol: UDP
407
- port: 4015
408
- targetPort: 4015
409
-
410
- - name: 'tcp-4016'
411
- protocol: TCP
412
- port: 4016
413
- targetPort: 4016
414
- - name: 'udp-4016'
415
- protocol: UDP
416
- port: 4016
417
- targetPort: 4016
418
- type: LoadBalancer
@@ -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 (GENERATED: per-variant sub-path routing)
12
- # └── mongodb/entrypoint.sh (GENERATED infra: replica-set bootstrap)
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"). nginx.conf routes each host sub-path to its tier and is
20
- # generated from that same topology; keep the services below in sync with it.
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 each tier waits for the previous to
23
- # be healthy:
24
- # mongodb + valkey -> engine-cyberia -> 3x cyberia-server -> 3x cyberia-client -> proxy
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. Uses ./mongodb/entrypoint.sh, generated into
46
- # this dir by `underpost docker-compose --generate --docker-compose-id cyberia`.
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.80}
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 only by
217
- # INSTANCE_CODE the world each loads. Each waits for engine-cyberia healthy.
218
- # The default variant publishes host port 8081; the rest are internal-only
219
- # (reached through nginx sub-path routing).
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.80}
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
- ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
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', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
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
- engine-cyberia:
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.80}
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
- ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
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', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
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
- engine-cyberia:
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.80}
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
- ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
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', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
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
- engine-cyberia:
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 CYBERIA_WS_ORIGIN / _ENGINE_API_ORIGIN /
307
- # _DEFAULT_INSTANCE). Each client waits ONLY for its own server, so the three
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.80}
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://server.cyberiaonline.com}
323
- CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://www.cyberiaonline.com}
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', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
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.80}
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://server.cyberiaonline.com}
350
- CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://www.cyberiaonline.com}
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', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
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.80}
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://server.cyberiaonline.com}
375
- CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://www.cyberiaonline.com}
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', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
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
- # === Tier 5: reverse proxy (waits for all clients) =======================
392
- # Routes the three cyberiaonline.com hosts to their per-variant upstreams with
393
- # websocket upgrade. Config source of truth: ./nginx.conf (generated from the
394
- # multiInstance topology). Fronts the stack only once every tier is healthy.
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
- - dd-cyberia-internal
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: ['CMD', 'wget', '-q', '-O', '-', 'http://127.0.0.1/healthz']
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-client:
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