Problem
Local build (buildStrategy: "local") works great for app stacks: clone + build on the Openship host, transfer the artifact to the target server. But for docker / docker-compose projects it's hardcoded to "server" (apps/api/src/modules/deployments/build-config.ts), so the full docker build load lands on the target machine.
My setup: the Openship control-plane server is strong (4C/8G), but the business target servers are small (2C/4G). Docker builds (especially npm install inside the image) put real pressure on the small boxes and have caused deploy-time resource exhaustion.
Proposal
Extend buildStrategy: "local" to docker stacks:
- Build the image on the API host (
docker build with the locally-cloned context)
- Transfer it to the target daemon via
docker save → stream → docker load
- Deploy on the target as usual
The pieces largely exist already:
packages/adapters/src/runtime/image-transfer.ts — streams one image between two daemons as pure data (used today for same-server migration handover), no registry needed
packages/adapters/src/runtime/local-build.ts — shared local-build pipeline (clone → build → transfer callback)
- The deploy wizard already has the "This Machine / Server" build-location picker; it would just stop being hidden for docker stacks
Notes / open questions
- Compose stacks with multiple services: transfer each service's built image
- Architecture mismatch (e.g. arm64 Mac control plane → amd64 server) would need
docker buildx --platform
- Could reuse
handoverImages (one-time image handover used by migration) as the deploy-side seam
Problem
Local build (
buildStrategy: "local") works great for app stacks: clone + build on the Openship host, transfer the artifact to the target server. But for docker / docker-compose projects it's hardcoded to"server"(apps/api/src/modules/deployments/build-config.ts), so the fulldocker buildload lands on the target machine.My setup: the Openship control-plane server is strong (4C/8G), but the business target servers are small (2C/4G). Docker builds (especially
npm installinside the image) put real pressure on the small boxes and have caused deploy-time resource exhaustion.Proposal
Extend
buildStrategy: "local"to docker stacks:docker buildwith the locally-cloned context)docker save→ stream →docker loadThe pieces largely exist already:
packages/adapters/src/runtime/image-transfer.ts— streams one image between two daemons as pure data (used today for same-server migration handover), no registry neededpackages/adapters/src/runtime/local-build.ts— shared local-build pipeline (clone → build → transfer callback)Notes / open questions
docker buildx --platformhandoverImages(one-time image handover used by migration) as the deploy-side seam