@envsync-cloud/deploy-cli 0.6.7 → 0.6.9
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/dist/index.js +35 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -325,7 +325,7 @@ function normalizeConfig(raw) {
|
|
|
325
325
|
web: derivedImages.web,
|
|
326
326
|
landing: derivedImages.landing,
|
|
327
327
|
clickstack: raw.images?.clickstack ?? "clickhouse/clickstack-all-in-one:latest",
|
|
328
|
-
traefik: raw.images?.traefik ?? "traefik:v3.
|
|
328
|
+
traefik: raw.images?.traefik ?? "traefik:v3.6.6",
|
|
329
329
|
otel_agent: raw.images?.otel_agent ?? "otel/opentelemetry-collector-contrib:0.111.0"
|
|
330
330
|
},
|
|
331
331
|
services: {
|
|
@@ -748,10 +748,14 @@ services:
|
|
|
748
748
|
traefik:
|
|
749
749
|
image: ${config.images.traefik}
|
|
750
750
|
command:
|
|
751
|
-
- --providers.
|
|
752
|
-
- --providers.docker.
|
|
751
|
+
- --providers.swarm=true
|
|
752
|
+
- --providers.swarm.endpoint=unix:///var/run/docker.sock
|
|
753
|
+
- --providers.swarm.exposedByDefault=false
|
|
753
754
|
- --providers.file.filename=/etc/traefik/dynamic/traefik-dynamic.yaml
|
|
754
755
|
- --entrypoints.web.address=:80
|
|
756
|
+
- --entrypoints.web.http.redirections.entryPoint.to=websecure
|
|
757
|
+
- --entrypoints.web.http.redirections.entryPoint.scheme=https
|
|
758
|
+
- --entrypoints.web.http.redirections.entryPoint.permanent=true
|
|
755
759
|
- --entrypoints.websecure.address=:443
|
|
756
760
|
- --certificatesresolvers.letsencrypt.acme.email=${config.domain.acme_email}
|
|
757
761
|
- --certificatesresolvers.letsencrypt.acme.storage=/var/lib/traefik/acme.json
|
|
@@ -1249,7 +1253,7 @@ function runBootstrapInit(config) {
|
|
|
1249
1253
|
],
|
|
1250
1254
|
{ quiet: true }
|
|
1251
1255
|
).trim();
|
|
1252
|
-
const result =
|
|
1256
|
+
const result = parseBootstrapInitJson(output);
|
|
1253
1257
|
if (!result.openfgaStoreId || !result.openfgaModelId) {
|
|
1254
1258
|
throw new Error("Bootstrap init did not return OpenFGA IDs");
|
|
1255
1259
|
}
|
|
@@ -1259,6 +1263,31 @@ function runBootstrapInit(config) {
|
|
|
1259
1263
|
openfgaModelId: result.openfgaModelId
|
|
1260
1264
|
};
|
|
1261
1265
|
}
|
|
1266
|
+
function parseBootstrapInitJson(output) {
|
|
1267
|
+
const trimmed = output.trim();
|
|
1268
|
+
if (!trimmed) {
|
|
1269
|
+
throw new Error("Bootstrap init returned no JSON output");
|
|
1270
|
+
}
|
|
1271
|
+
try {
|
|
1272
|
+
return JSON.parse(trimmed);
|
|
1273
|
+
} catch {
|
|
1274
|
+
const lines = trimmed.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
1275
|
+
for (let index = lines.length - 1; index >= 0; index -= 1) {
|
|
1276
|
+
const candidate = lines[index];
|
|
1277
|
+
if (!candidate.startsWith("{") || !candidate.endsWith("}")) continue;
|
|
1278
|
+
try {
|
|
1279
|
+
return JSON.parse(candidate);
|
|
1280
|
+
} catch {
|
|
1281
|
+
continue;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
throw new Error(
|
|
1285
|
+
`Bootstrap init returned non-JSON output.
|
|
1286
|
+
Captured stdout:
|
|
1287
|
+
${trimmed}`
|
|
1288
|
+
);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1262
1291
|
function hasCompleteBootstrapState(generated) {
|
|
1263
1292
|
return REQUIRED_BOOTSTRAP_ENV_KEYS.every((key) => {
|
|
1264
1293
|
switch (key) {
|
|
@@ -1465,7 +1494,7 @@ async function cmdSetup() {
|
|
|
1465
1494
|
web: releaseImages.web,
|
|
1466
1495
|
landing: releaseImages.landing,
|
|
1467
1496
|
clickstack: "clickhouse/clickstack-all-in-one:latest",
|
|
1468
|
-
traefik: "traefik:v3.
|
|
1497
|
+
traefik: "traefik:v3.6.6",
|
|
1469
1498
|
otel_agent: "otel/opentelemetry-collector-contrib:0.111.0"
|
|
1470
1499
|
},
|
|
1471
1500
|
services: {
|
|
@@ -1672,7 +1701,7 @@ async function cmdUpgrade() {
|
|
|
1672
1701
|
async function cmdUpgradeDeps() {
|
|
1673
1702
|
logSection("Upgrade Dependencies");
|
|
1674
1703
|
const { config } = loadState();
|
|
1675
|
-
config.images.traefik = "traefik:v3.
|
|
1704
|
+
config.images.traefik = "traefik:v3.6.6";
|
|
1676
1705
|
config.images.clickstack = "clickhouse/clickstack-all-in-one:latest";
|
|
1677
1706
|
config.images.otel_agent = "otel/opentelemetry-collector-contrib:0.111.0";
|
|
1678
1707
|
saveDesiredConfig(config);
|