Repository navigation
Description
Current status, September 22
The local Docker evaluation path shipped in #472, and the one-command launcher is being reviewed in #486. These are Preview steps only: published immutable web/realtime images, production proxy and cron topology, multi-architecture publishing, SBOM/provenance and the clean-install/upgrade matrix remain open. Keep #391, #393 and #394 linked as prerequisites for the production distribution claim.
Original requirements
Goal
Publish reproducible, versioned Orbit application images and one production-shaped Compose definition that a stranger can deploy without assembling the architecture by hand.
This is a sibling of #391 under #388 and implements the application-container work tracked as DEP-003, DEP-005, CI-001, and part of REL-002 in docs/open-source-readiness.md.
Current boundary
- The repository has no application
Dockerfile. - The root
docker-compose.ymlstarts Postgres, Redis, MinIO, and bucket initialization only. - That Compose file exposes dependency ports and contains public development credentials, so it is not a production distribution artifact.
apps/webalready produces a copied Next.js standalone artifact and runs it with Node.- CI already smoke-tests the copied standalone artifact.
apps/realtimealready builds a Bun artifact and has a start command.bun run db:releasealready provides the locked production migration entry point.
Build on those existing contracts. Do not replace a tested standalone build with a second ad hoc server.
Deliverables
1. Canonical OCI images
Publish at least:
ghcr.io/noveum/orbit-web:<version>
ghcr.io/noveum/orbit-realtime:<version>
Use the web image for the one-shot migration command unless there is a measured reason to maintain a third image.
Each release image must:
- support
linux/amd64andlinux/arm64 - use an immutable version tag and digest
- carry OCI source, revision, version, license, title, and documentation labels
- contain only the production runtime and required assets
- run as a non-root user where the runtime permits it
- define a clear writable-filesystem contract
- start without package installation or source compilation
- contain no
.env, credential, test database, demo upload, or build-service token - be reproducible from the tagged source revision
latest may exist as a convenience alias, but no catalog template may depend on it.
2. Full production Compose topology
Add a production file distinct from the development infrastructure file, for example:
deploy/compose/compose.yaml
The all-in-one profile should include:
- reverse proxy
- web
- realtime
- one-shot migration
- Postgres
- Redis
- MinIO or another explicitly supported S3-compatible local service
- bucket initialization
Only the reverse proxy should publish a host port by default. Postgres, Redis, object storage, web, and realtime remain on private networks unless an operator deliberately changes the topology.
The same file may support external Postgres, Redis, and S3 through documented profiles or overrides, but the first release must keep one self-contained path that can be tested without third-party SaaS accounts.
3. Startup and dependency ordering
- The migration job takes the database lock, applies and verifies migrations, and exits successfully.
- Web and realtime do not accept traffic until required migration and dependency readiness conditions pass.
- Restarting application services never reruns destructive seed or reset behavior.
- A failed migration prevents rollout instead of starting new application code against an incompatible schema.
- Redis remains disposable; Postgres and object storage remain durable.
- Bucket creation is idempotent.
- Compose shutdown and restart do not corrupt data or leave the installation in a half-migrated state.
4. Secret contract
No default production password is committed.
The operator-facing path must either:
- require every secret through Compose secrets or an external environment file generated locally, or
- include a checked-in generator that writes a gitignored secrets file with cryptographically random values.
At minimum cover:
BETTER_AUTH_SECRET- Postgres user and password
- Redis authentication if enabled
- object-storage access and secret keys
- any first-owner/bootstrap secret introduced by the sibling bootstrap issue
The production entry points must reject known example values, placeholders, empty secrets, and development-only login flags.
5. Health and container behavior
- Web exposes minimal liveness and readiness separately.
- Realtime exposes the minimal contract agreed in Deployment: run realtime behind a provider-neutral same-origin WebSocket proxy #391.
- Postgres, Redis, and object storage use pinned images and native health checks.
- Compose health checks do not include secrets on the command line where they become visible through process inspection.
- Application logs go to stdout/stderr in structured form.
- SIGTERM reaches the Node and Bun processes and results in bounded graceful shutdown.
6. Release workflow
For every supported release tag:
- build both architectures
- run image-level smoke tests
- push immutable tags to GHCR
- optionally mirror identical images to Docker Hub after GHCR is proven
- attach an SBOM
- publish provenance tied to the exact source commit and image digest
- run vulnerability scanning under the dependency policy selected for SEC-006
- place the image references and digests in the release notes
Do not publish an image from an unreviewed pull request under a release tag.
Required tests
Build tests
- Build web and realtime images from a clean source checkout with no local cache dependency.
- Inspect the final filesystem and prove source secrets, development
.envfiles, test fixtures, and build caches are absent. - Start each image using only its documented runtime inputs.
- Run both images as their declared non-root user.
- Build and smoke-test
amd64andarm64variants.
Clean installation
- Generate fresh secrets.
- Start the complete production Compose profile on a blank Docker host.
- Run the migration job once and verify it exits zero.
- Run it again and prove the operation is idempotent.
- Complete the first-owner flow defined by the sibling bootstrap issue.
- Create a workspace, issue, project, doc, comment, and file attachment.
- Verify two-browser realtime through the same-origin proxy from Deployment: run realtime behind a provider-neutral same-origin WebSocket proxy #391.
- Restart web, realtime, Redis, proxy, Postgres, and object storage.
- Prove all durable data and uploaded files remain and realtime reconnects.
- Bring the stack down without volumes, bring it back up, and repeat the persistence checks.
Upgrade installation
- Install the previous supported release from immutable digests.
- Seed representative application data through public product paths.
- Replace image digests with the candidate release.
- Run the migration job and roll application services.
- Prove data, authorization, uploads, MCP grants, and realtime still work.
- Record the supported forward-repair or rollback behavior for failures after a schema change.
CI
Add a production-container lane that runs when Dockerfiles, Compose, migrations, release scripts, or runtime packaging changes.
The lane must fail on:
- a missing or floating application image tag
- stale generated Compose/catalog output
- unhealthy service startup
- migration failure or drift
- public dependency ports in the default production profile
- default credentials
- missing persistent volumes
- failed two-browser realtime
- failed restart persistence
- failure to upgrade from the previous supported image
Nightly coverage may run the heavier multi-architecture and previous-release matrix, but every pull request changing deployment behavior needs at least one production-shaped clean-install smoke test.
Documentation
Document:
- exact supported image names and tags
- resource minimums and recommendations
- every required variable and secret
- persistent and disposable data
- external Postgres, Redis, and S3 overrides
- installation, upgrade, backup, restore, and uninstall behavior
- reverse-proxy and DNS requirements
- how to verify the running image digest
- where to report security and operational issues
Update the Preview statement only when the complete release gate in #388 is satisfied. Landing images alone does not make self-hosting stable.
Likely files
- new root or deployment-specific Dockerfiles
- new
.dockerignore apps/web/scripts/prepare-standalone.tsapps/web/package.jsonapps/realtime/package.jsondocker-compose.ymlfor development-only corrections- new
deploy/compose/ .github/workflows/ci.yml- new release-image workflow or the existing release workflow
docs/self-hosting.mddocs/configuration.mddocs/troubleshooting.mdSECURITY.md
Not part of this issue
- Designing the portable realtime behavior itself, tracked in Deployment: run realtime behind a provider-neutral same-origin WebSocket proxy #391
- First-owner claim and portable initial authentication, tracked in a sibling issue
- Provider-specific app-store manifests
- Helm packaging
- Adding a paid hosted tier
Review boundary
Split implementation into focused pull requests where practical:
- image construction and image smoke tests
- complete Compose topology and clean-install test
- multi-architecture release publishing, SBOM, provenance, and upgrade matrix
No pull request should be merged merely because an image builds. The release claim depends on the end-to-end installation and upgrade evidence above.
Activity