@underpostnet/cyberia 3.2.80 → 3.3.0

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 (162) hide show
  1. package/.env.example +50 -15
  2. package/.github/workflows/coverall.cyberia.ci.yml +87 -0
  3. package/.github/workflows/cyberia-client.cd.yml +2 -7
  4. package/.github/workflows/cyberia-server.cd.yml +2 -7
  5. package/.github/workflows/docker-image.cyberia-client.ci.yml +4 -4
  6. package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +4 -4
  7. package/.github/workflows/docker-image.cyberia-server.ci.yml +4 -4
  8. package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +4 -4
  9. package/.github/workflows/docker-image.engine-cyberia.ci.yml +3 -3
  10. package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +3 -3
  11. package/.github/workflows/engine-cyberia.cd.yml +3 -67
  12. package/.github/workflows/ghpkg.ci.yml +7 -1
  13. package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -16
  14. package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
  15. package/.github/workflows/release.cd.yml +1 -9
  16. package/CHANGELOG.md +291 -1
  17. package/CLI-HELP.md +174 -23
  18. package/Dockerfile +1 -1
  19. package/Dockerfile.dev +1 -1
  20. package/Dockerfile.test +1 -1
  21. package/bin/build.js +7 -5
  22. package/bin/cyberia.js +272 -98
  23. package/bin/deploy.js +19 -17
  24. package/bin/index.js +272 -98
  25. package/compose.env +50 -15
  26. package/conf.js +2 -0
  27. package/deploy/dd-cyberia/deploy.sh +42 -0
  28. package/deploy/dd-cyberia/init.sh +63 -0
  29. package/deploy/dd-cyberia/sync-deploy.sh +194 -0
  30. package/deploy/lib/logging.sh +96 -0
  31. package/deploy/pwa-microservices-template/deploy.sh +72 -0
  32. package/deploy/release/deploy.sh +62 -0
  33. package/deployment.yaml +1 -210
  34. package/docker-compose.yml +90 -85
  35. package/hardhat/package-lock.json +139 -131
  36. package/hardhat/package.json +4 -4
  37. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +5 -1
  38. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
  39. package/manifests/cronjobs/dd-cron/dd-cron-vultr.yaml +52 -0
  40. package/manifests/deployment/dd-cyberia-development/deployment.yaml +1 -210
  41. package/manifests/deployment/dd-cyberia-development/gateway.yaml +80 -0
  42. package/manifests/deployment/dd-cyberia-development/httproute.yaml +504 -0
  43. package/manifests/deployment/dd-cyberia-development/proxy.yaml +12 -12
  44. package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +0 -82
  45. package/manifests/deployment/dd-cyberia-development/traffic-service.yaml +121 -0
  46. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  47. package/manifests/deployment/playwright/deployment.yaml +1 -1
  48. package/manifests/mongodb/kustomization.yaml +4 -1
  49. package/manifests/mongodb/statefulset.yaml +4 -0
  50. package/manifests/mongodb/storage-class.yaml +9 -2
  51. package/nginx.conf +86 -16
  52. package/package.json +2 -2
  53. package/proxy.yaml +12 -12
  54. package/pv-pvc.yaml +0 -82
  55. package/scripts/audit-selinux.sh +64 -0
  56. package/scripts/coverall-test-cyberia.sh +24 -0
  57. package/scripts/coverall-test.sh +24 -0
  58. package/scripts/gpu-diag.sh +0 -0
  59. package/scripts/ip-info.sh +0 -0
  60. package/scripts/k3s-node-setup.sh +18 -15
  61. package/scripts/kubeadm-node-setup.sh +12 -23
  62. package/scripts/link-local-underpost-cli.sh +0 -0
  63. package/scripts/lxd-vm-setup.sh +0 -0
  64. package/scripts/maas-nat-firewalld.sh +0 -0
  65. package/scripts/nat-iptables.sh +12 -4
  66. package/scripts/rhel-grpc-setup.sh +0 -0
  67. package/scripts/rocky-kickstart.sh +25 -9
  68. package/scripts/test-monitor.sh +4 -3
  69. package/src/api/cyberia-action/cyberia-action.model.js +1 -0
  70. package/src/api/cyberia-instance/cyberia-fallback-default-items.js +63 -0
  71. package/src/api/cyberia-instance/cyberia-fallback-world.js +49 -15
  72. package/src/api/cyberia-instance/cyberia-instance-map.service.js +8 -12
  73. package/src/api/cyberia-instance/cyberia-instance.controller.js +3 -0
  74. package/src/api/cyberia-instance/cyberia-instance.router.js +13 -0
  75. package/src/api/cyberia-instance/cyberia-instance.service.js +43 -0
  76. package/src/api/cyberia-instance/cyberia-portal-connector.js +7 -5
  77. package/src/api/cyberia-instance/cyberia-random-source.js +80 -0
  78. package/src/api/cyberia-instance/cyberia-world-generator.js +4 -3
  79. package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +1 -0
  80. package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +87 -1
  81. package/src/api/object-layer/object-layer.model.js +204 -3
  82. package/src/api/object-layer/object-layer.service.js +1 -14
  83. package/src/cli/baremetal.js +1 -2
  84. package/src/cli/cloud-init.js +1 -1
  85. package/src/cli/cluster.js +786 -96
  86. package/src/cli/db.js +11 -4
  87. package/src/cli/deploy.js +1698 -177
  88. package/src/cli/docker-compose.js +19 -178
  89. package/src/cli/env.js +1 -1
  90. package/src/cli/image.js +15 -7
  91. package/src/cli/index.js +245 -44
  92. package/src/cli/ipfs.js +82 -11
  93. package/src/cli/lxd.js +1 -1
  94. package/src/cli/monitor.js +2 -2
  95. package/src/cli/release.js +57 -22
  96. package/src/cli/repository.js +12 -10
  97. package/src/cli/run.js +2195 -427
  98. package/src/cli/secrets.js +969 -0
  99. package/src/cli/ssh.js +206 -105
  100. package/src/cli/system.js +26 -13
  101. package/src/cli/test.js +1 -1
  102. package/src/cli/vultr.js +583 -0
  103. package/src/cli/wireguard.js +2125 -0
  104. package/src/client/components/cyberia/FallbackWorldEngineCyberia.js +368 -0
  105. package/src/client/components/cyberia/InstanceSelectionView.js +11 -8
  106. package/src/client/components/cyberia/SharedDefaultsCyberia.js +5 -0
  107. package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +33 -0
  108. package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +4 -0
  109. package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +4 -0
  110. package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +106 -39
  111. package/src/client/public/cyberia-docs/ARCHITECTURE.md +35 -3
  112. package/src/client/public/cyberia-docs/CYBERIA-CLI.md +44 -7
  113. package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +1 -1
  114. package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
  115. package/src/client/public/cyberia-docs/WHITE-PAPER.md +1 -1
  116. package/src/client/services/cyberia-instance/cyberia-instance.service.js +40 -0
  117. package/src/client/services/object-layer/object-layer.management.js +4 -4
  118. package/src/client-builder/client-build.js +102 -13
  119. package/src/client-builder/ssr.js +27 -73
  120. package/src/db/mongo/MongoBootstrap.js +295 -54
  121. package/src/db/mongo/MongooseDB.js +51 -32
  122. package/src/index.js +25 -1
  123. package/src/projects/cyberia/besu-genesis-generator.js +3 -2
  124. package/src/projects/cyberia/catalog-cyberia.js +5 -0
  125. package/src/projects/cyberia/generate-saga.js +14 -23
  126. package/src/projects/cyberia/hot-reload-trigger.js +3 -3
  127. package/src/projects/cyberia/instance-data.js +63 -3
  128. package/src/projects/cyberia/object-layer.js +11 -21
  129. package/src/projects/underpost/catalog-underpost.js +4 -1
  130. package/src/runtime/cyberia-client/Dockerfile +1 -1
  131. package/src/runtime/cyberia-client/Dockerfile.dev +1 -1
  132. package/src/runtime/cyberia-server/Dockerfile +1 -1
  133. package/src/runtime/cyberia-server/Dockerfile.dev +1 -1
  134. package/src/runtime/engine-cyberia/Dockerfile +1 -1
  135. package/src/runtime/engine-cyberia/Dockerfile.dev +1 -1
  136. package/src/runtime/engine-cyberia/Dockerfile.test +1 -1
  137. package/src/runtime/engine-cyberia/compose.env +50 -15
  138. package/src/runtime/engine-cyberia/docker-compose.yml +90 -85
  139. package/src/runtime/engine-cyberia/nginx.conf +86 -16
  140. package/src/server/backup.js +1 -1
  141. package/src/server/conf.js +1216 -168
  142. package/src/server/cri.js +70 -0
  143. package/src/server/cron.js +249 -51
  144. package/src/server/dns.js +100 -6
  145. package/src/server/environment.js +98 -0
  146. package/src/server/forward-proxy.js +549 -0
  147. package/src/server/middlewares.js +56 -1
  148. package/src/server/process.js +0 -1
  149. package/src/server/selinux.js +185 -0
  150. package/src/server/systemd.js +205 -0
  151. package/src/server/underpost-compression.js +186 -0
  152. package/src/server/underpost-gateway.js +1083 -0
  153. package/src/server/underpost-ingress.js +380 -0
  154. package/test/cluster-instances.test.js +435 -0
  155. package/test/cyberia-instance-conf-defaults.test.js +1 -0
  156. package/test/deploy-node-placement.test.js +45 -0
  157. package/test/instance-traffic-plan.test.js +710 -0
  158. package/test/selinux.test.js +71 -0
  159. package/test/sops-secret-store.test.js +612 -0
  160. package/test/underpost-gateway.test.js +510 -0
  161. package/test/underpost-ingress.test.js +305 -0
  162. package/test/wireguard-edge.test.js +1177 -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.3.0
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
@@ -4,36 +4,6 @@
4
4
  # (MongoDB + Valkey + IPFS), then the Cyberia content-authority engine and its
5
5
  # per-instance server/client tiers, fronted by an nginx reverse proxy.
6
6
  #
7
- # Canonical location (custom docker-compose workflow):
8
- # engine-private/conf/dd-cyberia/docker-compose/cyberia/
9
- # ├── docker-compose.yml (this file — the ENTIRE stack, single source)
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)
13
- # All bind mounts below are relative to this directory: the CLI runs compose with
14
- # `--project-directory` pinned here (see src/cli/docker-compose.js).
15
- #
16
- # Multi-instance: one engine-cyberia (content + asset authority) feeds three
17
- # cyberia-server + three cyberia-client tiers, one per conf.instances.json
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.
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
25
- #
26
- # Architecture boundaries (see CLAUDE.md "Cyberia architecture boundaries"):
27
- # engine-cyberia — content, validation, persistence, gRPC(:50051)+REST(:4005)
28
- # data services, asset metadata. The authority layer.
29
- # cyberia-server — authoritative real-time simulation / tick processing (Go).
30
- # cyberia-client — rendering, input, prediction, presentation (WASM bundle).
31
- #
32
- # Usage:
33
- # underpost docker-compose --up --deploy-id dd-cyberia --docker-compose-id cyberia
34
- # (or the docker:cyberia:* npm scripts). The engine-cyberia image bakes the
35
- # dd-cyberia build at image-build time, so no private-repo credentials are
36
- # required at container start.
37
7
 
38
8
  name: dd-cyberia
39
9
 
@@ -42,8 +12,8 @@ services:
42
12
 
43
13
  # --- MongoDB -------------------------------------------------------------
44
14
  # 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`.
15
+ # loopback localhost exception. This custom workflow owns the mounted
16
+ # ./mongodb/entrypoint.sh bootstrap script.
47
17
  mongodb:
48
18
  image: ${MONGO_IMAGE:-mongo:latest}
49
19
  container_name: dd-cyberia-mongodb
@@ -164,8 +134,8 @@ services:
164
134
  # variant that has local content (amethyst + FOREST; TEST has none yet, so its
165
135
  # server starts but rejects connections until seeded). Serves REST/WS on 4005
166
136
  # 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}
137
+ engine-cyberia-runtime:
138
+ image: ${ENGINE_CYBERIA_IMAGE:-underpost/engine-cyberia-dev}:${ENGINE_CYBERIA_TAG:-v3.3.0}
169
139
  container_name: dd-cyberia-engine
170
140
  command:
171
141
  - /bin/sh
@@ -213,147 +183,172 @@ services:
213
183
  restart: unless-stopped
214
184
 
215
185
  # === 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).
186
+ # All three share engine-cyberia (content + gRPC) and differ by INSTANCE_CODE
187
+ # and CYBERIA_BASE_PATH. Each server owns its public path and waits for the
188
+ # stable gateway, which itself waits for the engine runtime to be healthy.
189
+ # All variants are internal-only. The proxy publishes a dedicated server
190
+ # gateway on host port 8081, so one port can route every instance path.
220
191
 
221
- cyberia-server:
222
- image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.80}
192
+ cyberia-server-runtime:
193
+ image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.3.0}
223
194
  container_name: dd-cyberia-server
224
195
  environment:
225
196
  INSTANCE_CODE: amethyst-strata-expansion
226
- ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
197
+ CYBERIA_BASE_PATH: /
198
+ ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia}
227
199
  ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
228
- ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
200
+ ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia-runtime:50051}
229
201
  ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
230
202
  STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
231
203
  APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
232
204
  LOG_LEVEL: ${CYBERIA_SERVER_LOG_LEVEL:-}
205
+ CYBERIA_DISABLE_CONNECTION_LIMITS: ${CYBERIA_DISABLE_CONNECTION_LIMITS:-}
206
+ CYBERIA_MAX_CONNECTIONS: ${CYBERIA_MAX_CONNECTIONS:-}
207
+ CYBERIA_MAX_CONNECTIONS_PER_IP: ${CYBERIA_MAX_CONNECTIONS_PER_IP:-}
208
+ CYBERIA_CONNECT_RATE_PER_IP: ${CYBERIA_CONNECT_RATE_PER_IP:-}
209
+ CYBERIA_CONNECT_BURST_PER_IP: ${CYBERIA_CONNECT_BURST_PER_IP:-}
210
+ CYBERIA_MESSAGE_RATE: ${CYBERIA_MESSAGE_RATE:-}
211
+ CYBERIA_MESSAGE_BURST: ${CYBERIA_MESSAGE_BURST:-}
212
+ CYBERIA_MAX_STRIKES: ${CYBERIA_MAX_STRIKES:-}
233
213
  networks:
234
214
  - dd-cyberia-internal
235
215
  expose:
236
216
  - '8081'
237
- ports:
238
- - '${CYBERIA_SERVER_PORT:-8081}:8081'
239
217
  healthcheck:
240
- test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
218
+ test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/api/v1/health/ready >/dev/null || exit 1']
241
219
  interval: 15s
242
220
  timeout: 5s
243
221
  retries: 5
244
222
  start_period: 30s
245
223
  depends_on:
246
- engine-cyberia:
224
+ proxy:
247
225
  condition: service_healthy
248
226
  restart: unless-stopped
249
227
 
250
228
  cyberia-server-forest:
251
- image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.80}
229
+ image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.3.0}
252
230
  container_name: dd-cyberia-server-forest
253
231
  environment:
254
232
  INSTANCE_CODE: FOREST
255
- ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
233
+ CYBERIA_BASE_PATH: /FOREST
234
+ ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia}
256
235
  ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
257
- ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
236
+ ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia-runtime:50051}
258
237
  ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
259
238
  STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
260
239
  APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
261
240
  LOG_LEVEL: ${CYBERIA_SERVER_LOG_LEVEL:-}
241
+ CYBERIA_DISABLE_CONNECTION_LIMITS: ${CYBERIA_DISABLE_CONNECTION_LIMITS:-}
242
+ CYBERIA_MAX_CONNECTIONS: ${CYBERIA_MAX_CONNECTIONS:-}
243
+ CYBERIA_MAX_CONNECTIONS_PER_IP: ${CYBERIA_MAX_CONNECTIONS_PER_IP:-}
244
+ CYBERIA_CONNECT_RATE_PER_IP: ${CYBERIA_CONNECT_RATE_PER_IP:-}
245
+ CYBERIA_CONNECT_BURST_PER_IP: ${CYBERIA_CONNECT_BURST_PER_IP:-}
246
+ CYBERIA_MESSAGE_RATE: ${CYBERIA_MESSAGE_RATE:-}
247
+ CYBERIA_MESSAGE_BURST: ${CYBERIA_MESSAGE_BURST:-}
248
+ CYBERIA_MAX_STRIKES: ${CYBERIA_MAX_STRIKES:-}
262
249
  networks:
263
250
  - dd-cyberia-internal
264
251
  expose:
265
252
  - '8081'
266
253
  healthcheck:
267
- test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
254
+ test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/FOREST/api/v1/health/ready >/dev/null || exit 1']
268
255
  interval: 15s
269
256
  timeout: 5s
270
257
  retries: 5
271
258
  start_period: 30s
272
259
  depends_on:
273
- engine-cyberia:
260
+ proxy:
274
261
  condition: service_healthy
275
262
  restart: unless-stopped
276
263
 
277
264
  cyberia-server-test:
278
- image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.2.80}
265
+ image: ${CYBERIA_SERVER_IMAGE:-underpost/cyberia-server-dev}:${CYBERIA_SERVER_TAG:-v3.3.0}
279
266
  container_name: dd-cyberia-server-test
280
267
  environment:
281
268
  INSTANCE_CODE: TEST
282
- ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia:4005}
269
+ CYBERIA_BASE_PATH: /TEST
270
+ ENGINE_API_BASE_URL: ${ENGINE_API_BASE_URL:-http://engine-cyberia}
283
271
  ENGINE_PUBLIC_URL: ${ENGINE_PUBLIC_URL:-http://localhost:4005}
284
- ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia:50051}
272
+ ENGINE_GRPC_ADDRESS: ${ENGINE_GRPC_ADDRESS:-engine-cyberia-runtime:50051}
285
273
  ENGINE_GRPC_RELOAD_INTERVAL_SEC: ${ENGINE_GRPC_RELOAD_INTERVAL_SEC:-300}
286
274
  STATIC_DIR: ${CYBERIA_SERVER_STATIC_DIR:-/home/dd/engine/cyberia-server/public}
287
275
  APP_ENV: ${CYBERIA_SERVER_APP_ENV:-development}
288
276
  LOG_LEVEL: ${CYBERIA_SERVER_LOG_LEVEL:-}
277
+ CYBERIA_DISABLE_CONNECTION_LIMITS: ${CYBERIA_DISABLE_CONNECTION_LIMITS:-}
278
+ CYBERIA_MAX_CONNECTIONS: ${CYBERIA_MAX_CONNECTIONS:-}
279
+ CYBERIA_MAX_CONNECTIONS_PER_IP: ${CYBERIA_MAX_CONNECTIONS_PER_IP:-}
280
+ CYBERIA_CONNECT_RATE_PER_IP: ${CYBERIA_CONNECT_RATE_PER_IP:-}
281
+ CYBERIA_CONNECT_BURST_PER_IP: ${CYBERIA_CONNECT_BURST_PER_IP:-}
282
+ CYBERIA_MESSAGE_RATE: ${CYBERIA_MESSAGE_RATE:-}
283
+ CYBERIA_MESSAGE_BURST: ${CYBERIA_MESSAGE_BURST:-}
284
+ CYBERIA_MAX_STRIKES: ${CYBERIA_MAX_STRIKES:-}
289
285
  networks:
290
286
  - dd-cyberia-internal
291
287
  expose:
292
288
  - '8081'
293
289
  healthcheck:
294
- test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
290
+ test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/TEST/api/v1/health/ready >/dev/null || exit 1']
295
291
  interval: 15s
296
292
  timeout: 5s
297
293
  retries: 5
298
294
  start_period: 30s
299
295
  depends_on:
300
- engine-cyberia:
296
+ proxy:
301
297
  condition: service_healthy
302
298
  restart: unless-stopped
303
299
 
304
300
  # === Tier 4: presentation, one per variant ===============================
305
301
  # 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
302
+ # sub-path (docker-driver injects CYBERIA_BASE_PATH / _WS_ORIGIN /
303
+ # _ENGINE_API_ORIGIN / _DEFAULT_INSTANCE). Each client waits ONLY for its own
304
+ # server, so the three
308
305
  # server->client pipelines advance independently (in parallel) once the shared
309
306
  # engine-cyberia is healthy:
310
307
  # cyberia-server -> cyberia-client
311
308
  # cyberia-server-forest -> cyberia-client-forest
312
309
  # cyberia-server-test -> cyberia-client-test
313
310
 
314
- cyberia-client:
315
- image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.80}
311
+ cyberia-client-runtime:
312
+ image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.3.0}
316
313
  container_name: dd-cyberia-client
317
314
  environment:
318
315
  CYBERIA_PORT: '8081'
319
316
  CYBERIA_INSTANCE_CODE: amethyst-strata-expansion
320
317
  CYBERIA_BASE_PATH: /
321
318
  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}
319
+ CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://localhost:8081}
320
+ CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://localhost}
324
321
  networks:
325
322
  - dd-cyberia-internal
326
323
  expose:
327
324
  - '8081'
328
- ports:
329
- - '${CYBERIA_CLIENT_PORT:-8082}:8081'
330
325
  healthcheck:
331
- test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
326
+ test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/ >/dev/null || exit 1']
332
327
  interval: 15s
333
328
  timeout: 5s
334
329
  retries: 5
335
330
  start_period: 20s
336
331
  depends_on:
337
- cyberia-server:
332
+ cyberia-server-runtime:
338
333
  condition: service_healthy
339
334
  restart: unless-stopped
340
335
 
341
336
  cyberia-client-forest:
342
- image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.80}
337
+ image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.3.0}
343
338
  container_name: dd-cyberia-client-forest
344
339
  environment:
345
340
  CYBERIA_PORT: '8081'
346
341
  CYBERIA_INSTANCE_CODE: FOREST
347
342
  CYBERIA_BASE_PATH: /FOREST
348
343
  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}
344
+ CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://localhost:8081}
345
+ CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://localhost}
351
346
  networks:
352
347
  - dd-cyberia-internal
353
348
  expose:
354
349
  - '8081'
355
350
  healthcheck:
356
- test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
351
+ test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/FOREST/ >/dev/null || exit 1']
357
352
  interval: 15s
358
353
  timeout: 5s
359
354
  retries: 5
@@ -364,21 +359,21 @@ services:
364
359
  restart: unless-stopped
365
360
 
366
361
  cyberia-client-test:
367
- image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.2.80}
362
+ image: ${CYBERIA_CLIENT_IMAGE:-underpost/cyberia-client-dev}:${CYBERIA_CLIENT_TAG:-v3.3.0}
368
363
  container_name: dd-cyberia-client-test
369
364
  environment:
370
365
  CYBERIA_PORT: '8081'
371
366
  CYBERIA_INSTANCE_CODE: TEST
372
367
  CYBERIA_BASE_PATH: /TEST
373
368
  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}
369
+ CYBERIA_WS_ORIGIN: ${CYBERIA_WS_ORIGIN:-ws://localhost:8081}
370
+ CYBERIA_ENGINE_API_ORIGIN: ${CYBERIA_ENGINE_API_ORIGIN:-http://localhost}
376
371
  networks:
377
372
  - dd-cyberia-internal
378
373
  expose:
379
374
  - '8081'
380
375
  healthcheck:
381
- test: ['CMD-SHELL', "timeout 2 bash -c '</dev/tcp/127.0.0.1/8081' || exit 1"]
376
+ test: ['CMD-SHELL', 'curl -fsS http://127.0.0.1:8081/TEST/ >/dev/null || exit 1']
382
377
  interval: 15s
383
378
  timeout: 5s
384
379
  retries: 5
@@ -388,31 +383,41 @@ services:
388
383
  condition: service_healthy
389
384
  restart: unless-stopped
390
385
 
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.
386
+ # === Stable HTTP gateway =================================================
387
+ # Routes stable Docker DNS names and localhost paths to their per-variant
388
+ # upstreams with websocket upgrade. Config source of truth: ./nginx.conf,
389
+ # maintained by this custom workflow. Ports 80 and 8082 serve the multi-path
390
+ # client gateway; port 8081 is the multi-path server gateway. It starts as
391
+ # soon as the engine is healthy so server startup can safely use the stable
392
+ # engine-cyberia HTTP alias. Client/server upstreams resolve lazily as their
393
+ # independently health-gated pipelines become available.
395
394
  proxy:
396
395
  image: ${PROXY_IMAGE:-nginx:stable-alpine}
397
396
  container_name: dd-cyberia-proxy
398
397
  volumes:
399
398
  - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
400
399
  networks:
401
- - dd-cyberia-internal
400
+ dd-cyberia-internal:
401
+ aliases:
402
+ - cyberia-client
403
+ - cyberia-server
404
+ - engine-cyberia
402
405
  ports:
403
406
  - '${PROXY_HTTP_PORT:-80}:80'
407
+ - '${CYBERIA_SERVER_PORT:-8081}:8081'
408
+ - '${CYBERIA_CLIENT_PORT:-8082}:80'
404
409
  healthcheck:
405
- test: ['CMD', 'wget', '-q', '-O', '-', 'http://127.0.0.1/healthz']
410
+ test:
411
+ - CMD-SHELL
412
+ - >-
413
+ wget -q -O /dev/null http://127.0.0.1/healthz &&
414
+ wget -q -O /dev/null http://127.0.0.1:8081/healthz
406
415
  interval: 15s
407
416
  timeout: 5s
408
417
  retries: 5
409
418
  start_period: 10s
410
419
  depends_on:
411
- cyberia-client:
412
- condition: service_healthy
413
- cyberia-client-forest:
414
- condition: service_healthy
415
- cyberia-client-test:
420
+ engine-cyberia-runtime:
416
421
  condition: service_healthy
417
422
  restart: unless-stopped
418
423