@envsync-cloud/deploy 0.20.3 → 0.20.4

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/cli.js CHANGED
@@ -361,6 +361,7 @@ function buildRuntimeEnv2(config, generated, options) {
361
361
  ENVSYNC_EDITION: oss ? "oss" : "enterprise",
362
362
  // Self-host product install — never multi-tenant SaaS mode (program plan Phase 1).
363
363
  ENVSYNC_DEPLOYMENT_MODE: "selfhosted",
364
+ SKIP_ROOT_ENV: "1",
364
365
  ENVSYNC_MANAGEMENT_ENABLED: oss ? "false" : "true",
365
366
  // Landing is Hosted-only; self-host does not ship marketing/signup surface.
366
367
  ENVSYNC_LANDING_ENABLED: "false",
@@ -1144,6 +1145,12 @@ ${renderEnvList({
1144
1145
  })}
1145
1146
  ${apiLicenseVolume}
1146
1147
  networks: [envsync]
1148
+ healthcheck:
1149
+ test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:4000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
1150
+ interval: 10s
1151
+ timeout: 5s
1152
+ retries: 8
1153
+ start_period: 45s
1147
1154
  deploy:
1148
1155
  replicas: ${slotHasApiDeployment(deployment.slots.blue) ? 1 : 0}
1149
1156
 
@@ -1157,6 +1164,12 @@ ${renderEnvList({
1157
1164
  })}
1158
1165
  ${apiLicenseVolume}
1159
1166
  networks: [envsync]
1167
+ healthcheck:
1168
+ test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:4000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
1169
+ interval: 10s
1170
+ timeout: 5s
1171
+ retries: 8
1172
+ start_period: 45s
1160
1173
  deploy:
1161
1174
  replicas: ${slotHasApiDeployment(deployment.slots.green) ? 1 : 0}` : ""}${netutilsService}${vpnResult?.serviceBlock ?? ""}
1162
1175
 
@@ -3634,7 +3647,15 @@ function waitForApiSlotHealthy(config, slot, timeoutSeconds = 180) {
3634
3647
  sleepSeconds(3);
3635
3648
  }
3636
3649
  const services = listStackServices(config);
3637
- throw new Error(`Timed out waiting for API ${slot} slot to become healthy: ${serviceHealth(services, serviceName)}`);
3650
+ const ps = tryRun("docker", ["service", "ps", serviceName, "--no-trunc", "--format", "{{.CurrentState}} {{.Error}}"], {
3651
+ quiet: true
3652
+ });
3653
+ const logs = tryRun("docker", ["service", "logs", "--tail", "80", serviceName], { quiet: true });
3654
+ throw new Error(
3655
+ `Timed out waiting for API ${slot} slot to become healthy: ${serviceHealth(services, serviceName)}
3656
+ ${ps}
3657
+ ${logs}`
3658
+ );
3638
3659
  }
3639
3660
  function waitForHealthyServices(config, checks, timeoutSeconds = 180) {
3640
3661
  if (currentOptions.dryRun) {
@@ -4192,8 +4213,8 @@ async function cmdDeploy() {
4192
4213
  logSection("Deploy");
4193
4214
  const { config, generated } = loadState();
4194
4215
  logReleaseContext(config);
4195
- if (!isOssConfig2(config)) {
4196
- ensureEnterpriseLicenseFilesReadable();
4216
+ if (!isOssConfig2(config) && !currentOptions.dryRun) {
4217
+ await ensureEnterpriseCertificateBundle(config);
4197
4218
  }
4198
4219
  assertSwarmManager();
4199
4220
  assertBootstrapState(generated);
@@ -4573,7 +4594,7 @@ async function cmdUpgrade(targetVersion) {
4573
4594
  };
4574
4595
  logReleaseContext(config);
4575
4596
  if (!isOssConfig2(config) && !currentOptions.dryRun) {
4576
- ensureEnterpriseLicenseFilesReadable();
4597
+ await ensureEnterpriseCertificateBundle(config);
4577
4598
  }
4578
4599
  config.images = {
4579
4600
  ...config.images,
package/dist/index.js CHANGED
@@ -362,6 +362,7 @@ function buildRuntimeEnv2(config, generated, options) {
362
362
  ENVSYNC_EDITION: oss ? "oss" : "enterprise",
363
363
  // Self-host product install — never multi-tenant SaaS mode (program plan Phase 1).
364
364
  ENVSYNC_DEPLOYMENT_MODE: "selfhosted",
365
+ SKIP_ROOT_ENV: "1",
365
366
  ENVSYNC_MANAGEMENT_ENABLED: oss ? "false" : "true",
366
367
  // Landing is Hosted-only; self-host does not ship marketing/signup surface.
367
368
  ENVSYNC_LANDING_ENABLED: "false",
@@ -1141,6 +1142,12 @@ ${renderEnvList({
1141
1142
  })}
1142
1143
  ${apiLicenseVolume}
1143
1144
  networks: [envsync]
1145
+ healthcheck:
1146
+ test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:4000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
1147
+ interval: 10s
1148
+ timeout: 5s
1149
+ retries: 8
1150
+ start_period: 45s
1144
1151
  deploy:
1145
1152
  replicas: ${slotHasApiDeployment(deployment.slots.blue) ? 1 : 0}
1146
1153
 
@@ -1154,6 +1161,12 @@ ${renderEnvList({
1154
1161
  })}
1155
1162
  ${apiLicenseVolume}
1156
1163
  networks: [envsync]
1164
+ healthcheck:
1165
+ test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:4000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
1166
+ interval: 10s
1167
+ timeout: 5s
1168
+ retries: 8
1169
+ start_period: 45s
1157
1170
  deploy:
1158
1171
  replicas: ${slotHasApiDeployment(deployment.slots.green) ? 1 : 0}` : ""}${netutilsService}${vpnResult?.serviceBlock ?? ""}
1159
1172
 
@@ -3496,7 +3509,15 @@ function waitForApiSlotHealthy(config, slot, timeoutSeconds = 180) {
3496
3509
  sleepSeconds(3);
3497
3510
  }
3498
3511
  const services = listStackServices(config);
3499
- throw new Error(`Timed out waiting for API ${slot} slot to become healthy: ${serviceHealth(services, serviceName)}`);
3512
+ const ps = tryRun("docker", ["service", "ps", serviceName, "--no-trunc", "--format", "{{.CurrentState}} {{.Error}}"], {
3513
+ quiet: true
3514
+ });
3515
+ const logs = tryRun("docker", ["service", "logs", "--tail", "80", serviceName], { quiet: true });
3516
+ throw new Error(
3517
+ `Timed out waiting for API ${slot} slot to become healthy: ${serviceHealth(services, serviceName)}
3518
+ ${ps}
3519
+ ${logs}`
3520
+ );
3500
3521
  }
3501
3522
  function waitForHealthyServices(config, checks, timeoutSeconds = 180) {
3502
3523
  if (currentOptions.dryRun) {
@@ -4054,8 +4075,8 @@ async function cmdDeploy() {
4054
4075
  logSection("Deploy");
4055
4076
  const { config, generated } = loadState();
4056
4077
  logReleaseContext(config);
4057
- if (!isOssConfig2(config)) {
4058
- ensureEnterpriseLicenseFilesReadable();
4078
+ if (!isOssConfig2(config) && !currentOptions.dryRun) {
4079
+ await ensureEnterpriseCertificateBundle(config);
4059
4080
  }
4060
4081
  assertSwarmManager();
4061
4082
  assertBootstrapState(generated);
@@ -4435,7 +4456,7 @@ async function cmdUpgrade(targetVersion) {
4435
4456
  };
4436
4457
  logReleaseContext(config);
4437
4458
  if (!isOssConfig2(config) && !currentOptions.dryRun) {
4438
- ensureEnterpriseLicenseFilesReadable();
4459
+ await ensureEnterpriseCertificateBundle(config);
4439
4460
  }
4440
4461
  config.images = {
4441
4462
  ...config.images,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envsync-cloud/deploy",
3
- "version": "0.20.3",
3
+ "version": "0.20.4",
4
4
  "description": "OSS CLI for self-hosted EnvSync deployment on Docker Swarm",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,7 +46,7 @@
46
46
  "zod": "^3.25.76"
47
47
  },
48
48
  "devDependencies": {
49
- "@envsync-cloud/deploy-core": "0.20.3",
49
+ "@envsync-cloud/deploy-core": "0.20.4",
50
50
  "tsup": "^8.5.0",
51
51
  "typescript": "^5.9.2"
52
52
  },