-
Notifications
You must be signed in to change notification settings - Fork 24
feat(deploy): package containers and cloud templates #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fb8f81c
feat(deploy): package portable catalog containers
imshashank 7da6cdb
feat(deploy): publish native arm64 catalog images
imshashank 3b7dbe4
feat(deploy): add Render and Zeabur deployment templates
imshashank e219d28
fix(deploy): preserve generated storage password characters
imshashank 4b13226
fix(deploy): pin corrected storage initializer
imshashank 67409b6
Merge remote-tracking branch 'origin/main' into codex/deployment-cata…
imshashank 6c387ac
docs: clarify independent container image pins
imshashank c124809
fix(deploy): handle reserved passwords and review edge cases
imshashank 8dfbf5a
chore: merge main before deployment review
imshashank 4f2352c
fix(deploy): validate versioned multi-platform release images
imshashank ec1a4f3
fix(deploy): pin provider templates to versioned containers
imshashank 0d0313d
fix(deploy): encode Zeabur credentials and verify manifest inputs
imshashank b1e7ded
Merge remote-tracking branch 'origin/main' into codex/deployment-cata…
imshashank File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Container images | ||
|
|
||
| on: | ||
| push: | ||
| tags: ['containers-*'] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| concurrency: | ||
| group: containers-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - runner: ubuntu-latest | ||
| arch: amd64 | ||
| - runner: ubuntu-24.04-arm | ||
| arch: arm64 | ||
| runs-on: ${{ matrix.runner }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Build application and gateway | ||
| run: | | ||
| set -euo pipefail | ||
| docker build -f deploy/docker/Dockerfile.catalog -t orbit-runtime:build . | ||
| docker build -f deploy/docker/Dockerfile.gateway -t orbit-gateway:build . | ||
| docker run --rm orbit-runtime:build node --check apps/web/migrate.mjs | ||
| docker run --rm orbit-runtime:build node --check apps/web/realtime.mjs | ||
| docker run --rm orbit-runtime:build node --check apps/web/scheduler.mjs | ||
| docker build -f deploy/docker/Dockerfile.bucket -t orbit-bucket:build . | ||
| docker run --rm orbit-gateway:build caddy validate --config /etc/caddy/Caddyfile | ||
| - name: Publish commit-addressed images | ||
| env: | ||
| REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| set -euo pipefail | ||
| printf '%s' "$REGISTRY_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin | ||
| for component in runtime gateway bucket; do | ||
| image="ghcr.io/noveum/orbit-${component}" | ||
| docker tag "orbit-${component}:build" "${image}:sha-${GITHUB_SHA}-${ARCH}" | ||
| docker push "${image}:sha-${GITHUB_SHA}-${ARCH}" | ||
| done | ||
| docker logout ghcr.io | ||
|
|
||
| publish: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Publish multi-platform manifests | ||
| env: | ||
| REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| printf '%s' "$REGISTRY_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin | ||
| for component in runtime gateway bucket; do | ||
| image="ghcr.io/noveum/orbit-${component}:sha-${GITHUB_SHA}" | ||
| docker manifest create "$image" "${image}-amd64" "${image}-arm64" | ||
| docker manifest push "$image" | ||
| done | ||
| docker logout ghcr.io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,215 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:18-alpine@sha256:9a8afca54e7861fd90fab5fdf4c42477a6b1cb7d293595148e674e0a3181de15 | ||
| environment: | ||
| POSTGRES_USER: orbit | ||
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?required} | ||
| POSTGRES_DB: orbit | ||
| volumes: | ||
| - postgres:/var/lib/postgresql | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - pg_isready -U orbit -d orbit | ||
| interval: 5s | ||
| timeout: 3s | ||
| retries: 20 | ||
| restart: unless-stopped | ||
| redis: | ||
| image: redis:8-alpine@sha256:978f0e01593e65eed801f2402944efcd936d43b5027e4908a7897baf88ed6241 | ||
| command: | ||
| - redis-server | ||
| - --appendonly | ||
| - 'yes' | ||
| volumes: | ||
| - redis:/data | ||
| healthcheck: | ||
| test: | ||
| - CMD | ||
| - redis-cli | ||
| - ping | ||
| interval: 5s | ||
| timeout: 3s | ||
| retries: 20 | ||
| restart: unless-stopped | ||
| storage: | ||
| image: quay.io/minio/minio@sha256:14cea493d9a34af32f524e538b8346cf79f3321eff8e708c1e2960462bd8936e | ||
| command: | ||
| - server | ||
| - /data | ||
| environment: | ||
| MINIO_ROOT_USER: orbit | ||
| MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD:?required} | ||
| MINIO_API_CORS_ALLOW_ORIGIN: ${ORBIT_APP_URL:?required} | ||
| volumes: | ||
| - storage:/data | ||
| healthcheck: | ||
| test: | ||
| - CMD | ||
| - mc | ||
| - ready | ||
| - local | ||
| interval: 5s | ||
| timeout: 3s | ||
| retries: 20 | ||
| restart: unless-stopped | ||
| expose: | ||
| - '9000' | ||
| bucket: | ||
| image: ${ORBIT_BUCKET_IMAGE:?required} | ||
| environment: | ||
| MINIO_PASSWORD: ${MINIO_PASSWORD:?required} | ||
| ORBIT_APP_URL: ${ORBIT_APP_URL:?required} | ||
| depends_on: | ||
| storage: | ||
| condition: service_healthy | ||
| restart: unless-stopped | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - test -f /tmp/initialized | ||
| interval: 5s | ||
| timeout: 3s | ||
| retries: 30 | ||
| web: | ||
| image: ${ORBIT_IMAGE:?required} | ||
| environment: | ||
| DATABASE_URL: postgres://orbit:${POSTGRES_PASSWORD:?required}@postgres:5432/orbit | ||
| DIRECT_URL: postgres://orbit:${POSTGRES_PASSWORD:?required}@postgres:5432/orbit | ||
| DATABASE_PREPARED_STATEMENTS: 'true' | ||
| REDIS_URL: redis://redis:6379 | ||
| BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:?required} | ||
| BETTER_AUTH_URL: ${ORBIT_APP_URL:?required} | ||
| NEXT_PUBLIC_APP_URL: ${ORBIT_APP_URL:?required} | ||
| ORBIT_PASSWORD_AUTH: ${ORBIT_PASSWORD_AUTH:-true} | ||
| ALLOWED_EMAIL_DOMAINS: ${ALLOWED_EMAIL_DOMAINS:-} | ||
| RESEND_API_KEY: ${RESEND_API_KEY:-} | ||
| EMAIL_FROM: ${EMAIL_FROM:-Orbit <auth@orbit.local>} | ||
| GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-} | ||
| GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-} | ||
| GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID:-} | ||
| GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET:-} | ||
| GITHUB_APP_SLUG: ${GITHUB_APP_SLUG:-} | ||
| GITHUB_APP_ID: ${GITHUB_APP_ID:-} | ||
| GITHUB_APP_PRIVATE_KEY: ${GITHUB_APP_PRIVATE_KEY:-} | ||
| GITHUB_APP_CLIENT_ID: ${GITHUB_APP_CLIENT_ID:-} | ||
| GITHUB_APP_CLIENT_SECRET: ${GITHUB_APP_CLIENT_SECRET:-} | ||
| GITHUB_WEBHOOK_SECRET: ${GITHUB_WEBHOOK_SECRET:-} | ||
| SLACK_ENABLED: ${SLACK_ENABLED:-false} | ||
| SLACK_CLIENT_ID: ${SLACK_CLIENT_ID:-} | ||
| SLACK_CLIENT_SECRET: ${SLACK_CLIENT_SECRET:-} | ||
| SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET:-} | ||
| SLACK_APP_ID: ${SLACK_APP_ID:-} | ||
| CRON_SECRET: ${CRON_SECRET:-} | ||
| ORBIT_SELF_HOSTED: 'true' | ||
| S3_ENDPOINT: ${ORBIT_STORAGE_URL:?required} | ||
| S3_REGION: us-east-1 | ||
| S3_BUCKET: orbit-uploads | ||
| S3_ACCESS_KEY_ID: orbit | ||
| S3_SECRET_ACCESS_KEY: ${MINIO_PASSWORD:?required} | ||
| NEXT_TELEMETRY_DISABLED: '1' | ||
| healthcheck: | ||
| test: | ||
| - CMD | ||
| - node | ||
| - -e | ||
| - fetch('http://127.0.0.1:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1)) | ||
| interval: 10s | ||
| timeout: 5s | ||
| start_period: 30s | ||
| retries: 5 | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| redis: | ||
| condition: service_healthy | ||
| bucket: | ||
| condition: service_healthy | ||
| restart: unless-stopped | ||
| realtime: | ||
| image: ${ORBIT_IMAGE:?required} | ||
| command: | ||
| - node | ||
| - apps/web/realtime.mjs | ||
| environment: | ||
| DATABASE_URL: postgres://orbit:${POSTGRES_PASSWORD:?required}@postgres:5432/orbit | ||
| DIRECT_URL: postgres://orbit:${POSTGRES_PASSWORD:?required}@postgres:5432/orbit | ||
| DATABASE_PREPARED_STATEMENTS: 'true' | ||
| REDIS_URL: redis://redis:6379 | ||
| BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:?required} | ||
| BETTER_AUTH_URL: ${ORBIT_APP_URL:?required} | ||
| NEXT_PUBLIC_APP_URL: ${ORBIT_APP_URL:?required} | ||
| ORBIT_PASSWORD_AUTH: ${ORBIT_PASSWORD_AUTH:-true} | ||
| ALLOWED_EMAIL_DOMAINS: ${ALLOWED_EMAIL_DOMAINS:-} | ||
| RESEND_API_KEY: ${RESEND_API_KEY:-} | ||
| EMAIL_FROM: ${EMAIL_FROM:-Orbit <auth@orbit.local>} | ||
| GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-} | ||
| GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-} | ||
| GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID:-} | ||
| GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET:-} | ||
| GITHUB_APP_SLUG: ${GITHUB_APP_SLUG:-} | ||
| GITHUB_APP_ID: ${GITHUB_APP_ID:-} | ||
| GITHUB_APP_PRIVATE_KEY: ${GITHUB_APP_PRIVATE_KEY:-} | ||
| GITHUB_APP_CLIENT_ID: ${GITHUB_APP_CLIENT_ID:-} | ||
| GITHUB_APP_CLIENT_SECRET: ${GITHUB_APP_CLIENT_SECRET:-} | ||
| GITHUB_WEBHOOK_SECRET: ${GITHUB_WEBHOOK_SECRET:-} | ||
| SLACK_ENABLED: ${SLACK_ENABLED:-false} | ||
| SLACK_CLIENT_ID: ${SLACK_CLIENT_ID:-} | ||
| SLACK_CLIENT_SECRET: ${SLACK_CLIENT_SECRET:-} | ||
| SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET:-} | ||
| SLACK_APP_ID: ${SLACK_APP_ID:-} | ||
| CRON_SECRET: ${CRON_SECRET:-} | ||
| ORBIT_SELF_HOSTED: 'true' | ||
| S3_ENDPOINT: ${ORBIT_STORAGE_URL:?required} | ||
| S3_REGION: us-east-1 | ||
| S3_BUCKET: orbit-uploads | ||
| S3_ACCESS_KEY_ID: orbit | ||
| S3_SECRET_ACCESS_KEY: ${MINIO_PASSWORD:?required} | ||
| NEXT_TELEMETRY_DISABLED: '1' | ||
| healthcheck: | ||
| test: | ||
| - CMD | ||
| - node | ||
| - -e | ||
| - fetch('http://127.0.0.1:3100/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1)) | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| depends_on: | ||
| web: | ||
| condition: service_healthy | ||
| bucket: | ||
| condition: service_healthy | ||
| restart: unless-stopped | ||
| scheduler: | ||
| image: ${ORBIT_IMAGE:?required} | ||
| command: | ||
| - node | ||
| - apps/web/scheduler.mjs | ||
| environment: | ||
| CRON_SECRET: ${CRON_SECRET:?required} | ||
| ORBIT_INTERNAL_URL: http://web:3000 | ||
| stop_grace_period: 310s | ||
| depends_on: | ||
| web: | ||
| condition: service_healthy | ||
| restart: unless-stopped | ||
| orbit: | ||
| image: ${ORBIT_GATEWAY_IMAGE:?required} | ||
| environment: | ||
| ORBIT_TRUSTED_PROXIES: ${ORBIT_TRUSTED_PROXIES:-private_ranges} | ||
| depends_on: | ||
| web: | ||
| condition: service_healthy | ||
| realtime: | ||
| condition: service_healthy | ||
| scheduler: | ||
| condition: service_started | ||
| restart: unless-stopped | ||
| expose: | ||
| - '3000' | ||
| volumes: | ||
| postgres: null | ||
| redis: null | ||
| storage: null | ||
| version: '3.8' | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.