@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
|
@@ -15,6 +15,30 @@ const MONGODB_STATEFULSET_NAME = 'mongodb';
|
|
|
15
15
|
const MONGODB_DEFAULT_AUTH_SOURCE = 'admin';
|
|
16
16
|
const MONGODB_DEFAULT_REPLICA_SET = 'rs0';
|
|
17
17
|
const MONGODB_DEFAULT_REPLICA_COUNT = 3;
|
|
18
|
+
// Node-local base path backing the hostPath PVs (`<root>/v<replica index>`),
|
|
19
|
+
// generated one-per-replica by MongoBootstrap.applyReplicaVolumes().
|
|
20
|
+
const MONGODB_DATA_ROOT = '/data/mongodb';
|
|
21
|
+
// Replica volumes are hostPath PVs generated one per member, each pinned by `claimRef`. The class
|
|
22
|
+
// must stay static: a dynamic provisioner competes with the static binder and makes
|
|
23
|
+
// member-to-directory assignment non-deterministic.
|
|
24
|
+
const MONGODB_STORAGE_CLASS_NAME = 'mongodb-storage-class';
|
|
25
|
+
const MONGODB_STORAGE_CLASS_PROVISIONER = 'kubernetes.io/no-provisioner';
|
|
26
|
+
/**
|
|
27
|
+
* Mongoose connection options for MongoDB, with sensible defaults for production and development environments.
|
|
28
|
+
* @type {import('mongoose').ConnectOptions}
|
|
29
|
+
*/
|
|
30
|
+
const MONGODB_CONNECTION_OPTIONS = {
|
|
31
|
+
autoIndex: process.env.NODE_ENV !== 'production',
|
|
32
|
+
heartbeatFrequencyMS: 10000,
|
|
33
|
+
maxConnecting: 2,
|
|
34
|
+
maxPoolSize: 10,
|
|
35
|
+
minPoolSize: 0,
|
|
36
|
+
retryReads: true,
|
|
37
|
+
retryWrites: true,
|
|
38
|
+
serverSelectionTimeoutMS: 30000,
|
|
39
|
+
socketTimeoutMS: 120000,
|
|
40
|
+
waitQueueTimeoutMS: 10000,
|
|
41
|
+
};
|
|
18
42
|
|
|
19
43
|
/**
|
|
20
44
|
* Resolves MongoDB replica hosts from explicit input or StatefulSet defaults.
|
|
@@ -49,6 +73,26 @@ const resolveMongoReplicaHosts = ({ hostList = '', replicaCount = MONGODB_DEFAUL
|
|
|
49
73
|
* 3. No built-in defaults — both `host` and `name` are required from the caller or environment.
|
|
50
74
|
*/
|
|
51
75
|
class MongooseDBService {
|
|
76
|
+
/**
|
|
77
|
+
* Establishes a Mongoose connection to the specified MongoDB instance.
|
|
78
|
+
*
|
|
79
|
+
* @async
|
|
80
|
+
* @param {object|string} configOrHost - Either a db config object or a legacy host string.
|
|
81
|
+
* @param {string} [configOrHost.host] - Legacy single host or comma-separated host list.
|
|
82
|
+
* @param {string} [configOrHost.name] - The database name.
|
|
83
|
+
* @param {string} [configOrHost.replicaSet] - The MongoDB replica set name.
|
|
84
|
+
* @param {string} [configOrHost.authSource] - The authentication database.
|
|
85
|
+
* @param {string} [configOrHost.user] - The MongoDB username.
|
|
86
|
+
* @param {string} [configOrHost.password] - The MongoDB password.
|
|
87
|
+
* @param {string} [name] - Legacy database name when a host string is passed.
|
|
88
|
+
* @returns {Promise<mongoose.Connection>} A promise that resolves to the established Mongoose connection object.
|
|
89
|
+
* @throws {Error} If neither the argument nor the corresponding environment variable supplies a value.
|
|
90
|
+
*/
|
|
91
|
+
async connect(configOrHost, name) {
|
|
92
|
+
const uri = this.buildUri(configOrHost, name);
|
|
93
|
+
// if (process.env.NODE_ENV === 'development') logger.info(`Connecting to MongoDB with URI`, uri);
|
|
94
|
+
return await mongoose.createConnection(uri, MONGODB_CONNECTION_OPTIONS).asPromise();
|
|
95
|
+
}
|
|
52
96
|
/**
|
|
53
97
|
* Normalizes Mongo host inputs into plain host:port entries.
|
|
54
98
|
* @param {Array<string>|string} hosts - Host input as list or comma-separated string.
|
|
@@ -125,38 +169,6 @@ class MongooseDBService {
|
|
|
125
169
|
return `mongodb://${credentials}${config.hosts.join(',')}/${config.dbName}${query.size ? `?${query.toString()}` : ''}`;
|
|
126
170
|
}
|
|
127
171
|
|
|
128
|
-
/**
|
|
129
|
-
* Establishes a Mongoose connection to the specified MongoDB instance.
|
|
130
|
-
*
|
|
131
|
-
* @async
|
|
132
|
-
* @param {object|string} configOrHost - Either a db config object or a legacy host string.
|
|
133
|
-
* @param {string} [configOrHost.host] - Legacy single host or comma-separated host list.
|
|
134
|
-
* @param {string} [configOrHost.name] - The database name.
|
|
135
|
-
* @param {string} [configOrHost.replicaSet] - The MongoDB replica set name.
|
|
136
|
-
* @param {string} [configOrHost.authSource] - The authentication database.
|
|
137
|
-
* @param {string} [configOrHost.user] - The MongoDB username.
|
|
138
|
-
* @param {string} [configOrHost.password] - The MongoDB password.
|
|
139
|
-
* @param {string} [name] - Legacy database name when a host string is passed.
|
|
140
|
-
* @returns {Promise<mongoose.Connection>} A promise that resolves to the established Mongoose connection object.
|
|
141
|
-
* @throws {Error} If neither the argument nor the corresponding environment variable supplies a value.
|
|
142
|
-
*/
|
|
143
|
-
async connect(configOrHost, name) {
|
|
144
|
-
const uri = this.buildUri(configOrHost, name);
|
|
145
|
-
if (process.env.NODE_ENV === 'development') logger.info(`Connecting to MongoDB with URI`, uri);
|
|
146
|
-
return await mongoose
|
|
147
|
-
.createConnection(uri, {
|
|
148
|
-
autoIndex: process.env.NODE_ENV !== 'production',
|
|
149
|
-
heartbeatFrequencyMS: 10000,
|
|
150
|
-
maxPoolSize: 20,
|
|
151
|
-
minPoolSize: 2,
|
|
152
|
-
retryReads: true,
|
|
153
|
-
retryWrites: true,
|
|
154
|
-
serverSelectionTimeoutMS: 5000,
|
|
155
|
-
socketTimeoutMS: 45000,
|
|
156
|
-
})
|
|
157
|
-
.asPromise();
|
|
158
|
-
}
|
|
159
|
-
|
|
160
172
|
/**
|
|
161
173
|
* Dynamically loads Mongoose models for a list of APIs and binds them to the given connection.
|
|
162
174
|
*
|
|
@@ -191,9 +203,12 @@ const MongooseDB = new MongooseDBService();
|
|
|
191
203
|
export {
|
|
192
204
|
MongooseDB,
|
|
193
205
|
MongooseDBService as MongooseDBClass,
|
|
206
|
+
MONGODB_DATA_ROOT,
|
|
194
207
|
MONGODB_DEFAULT_REPLICA_COUNT,
|
|
195
208
|
MONGODB_DEFAULT_REPLICA_SET,
|
|
196
209
|
MONGODB_SERVICE_NAME,
|
|
197
210
|
MONGODB_STATEFULSET_NAME,
|
|
211
|
+
MONGODB_STORAGE_CLASS_NAME,
|
|
212
|
+
MONGODB_STORAGE_CLASS_PROVISIONER,
|
|
198
213
|
resolveMongoReplicaHosts,
|
|
199
214
|
};
|
package/src/index.js
CHANGED
|
@@ -19,6 +19,7 @@ import path from 'path';
|
|
|
19
19
|
import { keccak256 as ethersKeccak256 } from 'ethers';
|
|
20
20
|
import { loggerFactory } from '../../server/logger.js';
|
|
21
21
|
import { shellExec } from '../../server/process.js';
|
|
22
|
+
import { crictlCommandFactory } from '../../server/cri.js';
|
|
22
23
|
|
|
23
24
|
const logger = loggerFactory(import.meta);
|
|
24
25
|
|
|
@@ -1394,8 +1395,8 @@ async function deployBesu(options = {}) {
|
|
|
1394
1395
|
// ── Step 2: Pull container images if requested ─────────────────────────
|
|
1395
1396
|
if (pullImage) {
|
|
1396
1397
|
logger.info('Pulling Besu images via crictl...');
|
|
1397
|
-
shellExec(`
|
|
1398
|
-
shellExec(`
|
|
1398
|
+
shellExec(crictlCommandFactory(`pull ${besuImage}`));
|
|
1399
|
+
shellExec(crictlCommandFactory(`pull ${curlImage}`));
|
|
1399
1400
|
}
|
|
1400
1401
|
|
|
1401
1402
|
// ── Step 3: Apply all besu resources via kustomize ─────────────────────
|
|
@@ -51,9 +51,9 @@ const serverApiKey = () => process.env.CYBERIA_SERVER_API_KEY || '';
|
|
|
51
51
|
*
|
|
52
52
|
* The URL sub-path is preserved as `basePath` ("", "/FOREST", "/TEST") and kept
|
|
53
53
|
* on `restBaseUrl`: a path-based multi-instance proxy routes the REST trigger to
|
|
54
|
-
* the right variant
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* the right variant, and cyberia-server consumes that same base path natively.
|
|
55
|
+
* Using `url.origin` alone would drop the sub-path and land every trigger on the
|
|
56
|
+
* default (root) deployment.
|
|
57
57
|
*/
|
|
58
58
|
const resolveTargets = (rawUrl, { grpcPort = DEFAULT_GRPC_PORT } = {}) => {
|
|
59
59
|
const trimmed = String(rawUrl || '').trim();
|
|
@@ -24,11 +24,37 @@ import {
|
|
|
24
24
|
DefaultCyberiaActions,
|
|
25
25
|
DefaultCyberiaQuests,
|
|
26
26
|
} from '../../api/cyberia-server-defaults/cyberia-server-defaults.js';
|
|
27
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
DEFAULT_INSTANCE_CODE,
|
|
29
|
+
DefaultCyberiaItems,
|
|
30
|
+
} from '../../client/components/cyberia/SharedDefaultsCyberia.js';
|
|
28
31
|
import { generateFallbackWorld } from '../../api/cyberia-instance/cyberia-fallback-world.js';
|
|
29
32
|
|
|
30
33
|
const logger = loggerFactory(import.meta);
|
|
31
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Builds the runtime env for one Cyberia MMO variant. The generic instance
|
|
37
|
+
* loader deliberately has no knowledge of these application-specific keys;
|
|
38
|
+
* Cyberia derives them from the normalized variant path/code here.
|
|
39
|
+
* @param {object} context - Instance env build context.
|
|
40
|
+
* @param {object} context.instance - Expanded instance descriptor.
|
|
41
|
+
* @param {Object<string,string>} context.env - Parsed canonical env values.
|
|
42
|
+
* @returns {Object<string,string>} Materialized Cyberia env values.
|
|
43
|
+
*/
|
|
44
|
+
function buildCyberiaMmoInstanceEnv({ instance = {}, env = {} }) {
|
|
45
|
+
const built = { ...env };
|
|
46
|
+
const instanceCode = instance.path === '/' ? DEFAULT_INSTANCE_CODE : instance.instanceCode;
|
|
47
|
+
if (instance.runtime === 'cyberia-server') {
|
|
48
|
+
built.INSTANCE_CODE = instanceCode;
|
|
49
|
+
built.CYBERIA_BASE_PATH = instance.path;
|
|
50
|
+
} else if (instance.runtime === 'cyberia-client') {
|
|
51
|
+
built.CYBERIA_INSTANCE_CODE = instanceCode;
|
|
52
|
+
built.CYBERIA_DEFAULT_INSTANCE = DEFAULT_INSTANCE_CODE;
|
|
53
|
+
built.CYBERIA_BASE_PATH = instance.path;
|
|
54
|
+
}
|
|
55
|
+
return built;
|
|
56
|
+
}
|
|
57
|
+
|
|
32
58
|
/**
|
|
33
59
|
* Resolves the mongoose model bag for a DB context.
|
|
34
60
|
* @param {{host?: string, path?: string}|string} context - RouterOptions-style
|
|
@@ -304,6 +330,8 @@ function toInstanceMsg(doc) {
|
|
|
304
330
|
};
|
|
305
331
|
}
|
|
306
332
|
|
|
333
|
+
const toCraftItemMsg = (i) => ({ itemId: i.itemId || '', qty: i.qty ?? 1 });
|
|
334
|
+
|
|
307
335
|
// CyberiaAction → CyberiaActionMessage (proto camelCase fields).
|
|
308
336
|
function toActionMsg(a) {
|
|
309
337
|
return {
|
|
@@ -317,6 +345,17 @@ function toActionMsg(a) {
|
|
|
317
345
|
questCode: qd.questCode || '',
|
|
318
346
|
dialogCode: qd.dialogCode || '',
|
|
319
347
|
})),
|
|
348
|
+
shopItems: (a.shopItems || []).map((si) => ({
|
|
349
|
+
itemId: si.itemId || '',
|
|
350
|
+
priceItemId: si.priceItemId || 'coin',
|
|
351
|
+
priceQty: si.priceQty ?? 1,
|
|
352
|
+
})),
|
|
353
|
+
craftRecipes: (a.craftRecipes || []).map((r) => ({
|
|
354
|
+
outputItems: (r.outputItems || []).map(toCraftItemMsg),
|
|
355
|
+
ingredients: (r.ingredients || []).map(toCraftItemMsg),
|
|
356
|
+
craftTimeMs: r.craftTimeMs ?? 0,
|
|
357
|
+
})),
|
|
358
|
+
storageSlots: a.storageSlots ?? 0,
|
|
320
359
|
};
|
|
321
360
|
}
|
|
322
361
|
|
|
@@ -693,6 +732,8 @@ async function fetchFullInstance(models, requestedInstanceCode) {
|
|
|
693
732
|
}
|
|
694
733
|
|
|
695
734
|
export {
|
|
735
|
+
buildCyberiaMmoInstanceEnv as buildInstanceEnv,
|
|
736
|
+
buildCyberiaMmoInstanceEnv,
|
|
696
737
|
getInstanceModels,
|
|
697
738
|
normalizeEntityDefault,
|
|
698
739
|
applyInstanceDefaultPlayerInventory,
|
|
@@ -43,7 +43,7 @@ RUN make -f Web.mk all BUILD_MODE=${BUILD_MODE} OUTPUT_DIR=bin/
|
|
|
43
43
|
# --- Runtime Image ---
|
|
44
44
|
FROM rockylinux/rockylinux:9 AS runtime
|
|
45
45
|
|
|
46
|
-
ARG UNDERPOST_VERSION=3.2.
|
|
46
|
+
ARG UNDERPOST_VERSION=3.2.90
|
|
47
47
|
ARG NODE_VERSION=24.15.0
|
|
48
48
|
RUN set -eux; \
|
|
49
49
|
dnf -y update; \
|
|
@@ -11,7 +11,7 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o server ./cmd/cyberia-se
|
|
|
11
11
|
|
|
12
12
|
# --- Runtime Image ---
|
|
13
13
|
FROM rockylinux/rockylinux:9 AS runtime
|
|
14
|
-
ARG UNDERPOST_VERSION=3.2.
|
|
14
|
+
ARG UNDERPOST_VERSION=3.2.90
|
|
15
15
|
ARG NODE_VERSION=24.15.0
|
|
16
16
|
|
|
17
17
|
RUN set -eux; \
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# Stage 1 — builder: clone the private deploy, build it, then scrub secrets.
|
|
7
7
|
# ---------------------------------------------------------------------------
|
|
8
8
|
FROM rockylinux/rockylinux:9 AS builder
|
|
9
|
-
ARG UNDERPOST_VERSION=3.2.
|
|
9
|
+
ARG UNDERPOST_VERSION=3.2.90
|
|
10
10
|
# Pin Node to an exact patch: dnf's nodejs:24 module lags (24.14.1) while
|
|
11
11
|
# underpost's dependencies require >=24.15.0, so install the official binary.
|
|
12
12
|
ARG NODE_VERSION=24.15.0
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# Stage 1 — builder: clone the private deploy, build it, then scrub secrets.
|
|
7
7
|
# ---------------------------------------------------------------------------
|
|
8
8
|
FROM rockylinux/rockylinux:9 AS builder
|
|
9
|
-
ARG UNDERPOST_VERSION=3.2.
|
|
9
|
+
ARG UNDERPOST_VERSION=3.2.90
|
|
10
10
|
# Pin Node to an exact patch: dnf's nodejs:24 module lags (24.14.1) while
|
|
11
11
|
# underpost's dependencies require >=24.15.0, so install the official binary.
|
|
12
12
|
ARG NODE_VERSION=24.15.0
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# Stage 1 — builder: clone the private deploy, build it, then scrub secrets.
|
|
7
7
|
# ---------------------------------------------------------------------------
|
|
8
8
|
FROM rockylinux/rockylinux:9 AS builder
|
|
9
|
-
ARG UNDERPOST_VERSION=3.2.
|
|
9
|
+
ARG UNDERPOST_VERSION=3.2.90
|
|
10
10
|
# Pin Node to an exact patch: dnf's nodejs:24 module lags (24.14.1) while
|
|
11
11
|
# underpost's dependencies require >=24.15.0, so install the official binary.
|
|
12
12
|
ARG NODE_VERSION=24.15.0
|
|
@@ -40,29 +40,27 @@ VALKEY_HOST=valkey-service
|
|
|
40
40
|
VALKEY_PORT=6379
|
|
41
41
|
|
|
42
42
|
# --- Cyberia instance wiring (compose service DNS) ---------------------------
|
|
43
|
-
# cyberia-server-* -> engine
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
ENGINE_GRPC_ADDRESS=engine-cyberia:50051
|
|
43
|
+
# cyberia-server-* -> stable engine gateway for HTTP and the raw engine runtime
|
|
44
|
+
# for gRPC. The public engine-cyberia name belongs to nginx, avoiding ambiguous
|
|
45
|
+
# Docker DNS while keeping one stable HTTP endpoint for every module.
|
|
46
|
+
ENGINE_API_BASE_URL=http://engine-cyberia
|
|
47
|
+
ENGINE_GRPC_ADDRESS=engine-cyberia-runtime:50051
|
|
49
48
|
|
|
50
49
|
# Client-visible Content Authority origin, forwarded to browser/Raylib clients
|
|
51
50
|
# for every engine-cyberia content/asset/metadata request. Host-reachable
|
|
52
|
-
# (
|
|
51
|
+
# (Docker publishes the raw engine runtime on host :4005). Unlike the internal
|
|
52
|
+
# ENGINE_API_BASE_URL, this value is consumed outside the Compose network:
|
|
53
53
|
# the two responsibilities must never overwrite each other.
|
|
54
54
|
ENGINE_PUBLIC_URL=http://localhost:4005
|
|
55
55
|
ENGINE_GRPC_RELOAD_INTERVAL_SEC=300
|
|
56
56
|
|
|
57
57
|
# --- Browser-facing client runtime config (injected by docker-driver.py) -----
|
|
58
58
|
# The single WASM bundle resolves its instance from the URL sub-path and builds
|
|
59
|
-
# its endpoints from these origins.
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
|
|
64
|
-
# http://localhost/FOREST -> FOREST instance, ws -> ws://localhost/FOREST/ws
|
|
65
|
-
CYBERIA_WS_ORIGIN=ws://localhost
|
|
59
|
+
# its endpoints from these origins. HTTP client/API traffic uses nginx on :80;
|
|
60
|
+
# WebSocket traffic uses the dedicated multi-path server gateway on :8081.
|
|
61
|
+
# http://localhost/ -> default, ws://localhost:8081/ws
|
|
62
|
+
# http://localhost/FOREST -> FOREST, ws://localhost:8081/FOREST/ws
|
|
63
|
+
CYBERIA_WS_ORIGIN=ws://localhost:8081
|
|
66
64
|
CYBERIA_ENGINE_API_ORIGIN=http://localhost
|
|
67
65
|
CYBERIA_DEFAULT_INSTANCE=amethyst-strata-expansion
|
|
68
66
|
|
|
@@ -82,6 +80,7 @@ NODE_OPTIONS=--max-old-space-size=8192
|
|
|
82
80
|
BASE_API=api
|
|
83
81
|
DEFAULT_DEPLOY_ID=dd-cyberia
|
|
84
82
|
DEPLOY_ID=dd-cyberia
|
|
83
|
+
# Configuration/DB selector from conf.server.json; this is not a Docker DNS alias.
|
|
85
84
|
DEFAULT_DEPLOY_HOST=www.cyberiaonline.com
|
|
86
85
|
DEFAULT_DEPLOY_PATH=/
|
|
87
86
|
DISABLE_API_RATE_LIMIT=true
|
|
@@ -131,7 +130,25 @@ IPFS_CLUSTER_API_URL=http://ipfs-cluster:9094
|
|
|
131
130
|
# in docker-compose.yml). Override for a real/shared cluster.
|
|
132
131
|
# CLUSTER_SECRET=
|
|
133
132
|
|
|
134
|
-
# ---
|
|
133
|
+
# --- Local access ------------------------------------------------------------
|
|
134
|
+
# Client gateway: http://localhost/{,FOREST,TEST}
|
|
135
|
+
# Client port alias: http://localhost:8082/{,FOREST,TEST}
|
|
136
|
+
# Server gateway: http://localhost:8081/{,FOREST,TEST}
|
|
137
|
+
# Engine authority: http://localhost:4005
|
|
138
|
+
# Docker-network gateways:
|
|
139
|
+
# http://cyberia-client/{,FOREST,TEST}
|
|
140
|
+
# http://cyberia-server/{,FOREST,TEST}
|
|
141
|
+
# http://engine-cyberia/
|
|
142
|
+
#
|
|
143
|
+
# The *.localhost aliases normally resolve to loopback without configuration:
|
|
144
|
+
# http://client.cyberia.localhost/{,FOREST,TEST}
|
|
145
|
+
# http://server.cyberia.localhost/{,FOREST,TEST}
|
|
146
|
+
# http://engine.cyberia.localhost/
|
|
147
|
+
# `node bin/cyberia run-workflow docker:up` maintains this host entry (the
|
|
148
|
+
# aliases already work between containers):
|
|
149
|
+
# 127.0.0.1 cyberia-client cyberia-server engine-cyberia
|
|
150
|
+
#
|
|
151
|
+
# Host-published ports:
|
|
135
152
|
PROXY_HTTP_PORT=80
|
|
136
153
|
IPFS_API_PORT=5001
|
|
137
154
|
IPFS_GATEWAY_PORT=8080
|
|
@@ -140,5 +157,7 @@ MONGO_HOST_PORT=27017
|
|
|
140
157
|
VALKEY_NODEPORT=32079
|
|
141
158
|
ENGINE_CYBERIA_REST_PORT=4005
|
|
142
159
|
ENGINE_CYBERIA_GRPC_PORT=50051
|
|
160
|
+
# Multi-path nginx server gateway, not a single server container publication.
|
|
143
161
|
CYBERIA_SERVER_PORT=8081
|
|
162
|
+
# Multi-path nginx client gateway; raw client containers remain internal.
|
|
144
163
|
CYBERIA_CLIENT_PORT=8082
|