This commit is contained in:
2026-08-25 16:54:57 -04:00
parent d026857b99
commit d054ba22c9
18 changed files with 1434 additions and 301 deletions
+6 -6
View File
@@ -55,7 +55,7 @@ export const main = sdk.setupMain(async ({ effects }) => {
type: 'directory',
})
const sub = await sdk.SubContainer.of(
const sub = sdk.SubContainer.of(
effects,
{ imageId: 'spacesops' },
mounts,
@@ -114,11 +114,11 @@ export const main = sdk.setupMain(async ({ effects }) => {
env.PLATFORM_CALLBACK_HOST =
store.platformCallbackHost ?? DEFAULT_PLATFORM_CALLBACK_HOST
// v1.0.3's entrypoint sources setup-spacesops-env.sh with set -u. That file
// exports NODE_EXTRA_CA_CERTS using ${_SCRIPT_DIR}, but _SCRIPT_DIR is set on
// a separate non-export line the entrypoint never evals — startup crashes
// unless NODE_EXTRA_CA_CERTS is already set. Fetch the StartOS root CA for
// outbound *.startos HTTPS (SUBS_URI host when configured, else Spaces).
// The image's setup-spacesops-env.sh defaults NODE_EXTRA_CA_CERTS to
// /app/certs/startos-local-root-ca.pem, a root CA baked in at build time from
// another box. Fetch this box's StartOS root CA and point the variable at it
// instead, so outbound HTTPS to *.startos succeeds (SUBS_URI host when
// configured, else Spaces).
const caHostname =
(store.subsUrl && startOsHostnameFromUrl(store.subsUrl)) ||
`${SPACES_PACKAGE_ID}.startos`