MidnightDocumentation

DEPLOY APPLICATIONS

Choose the input. Keep the release immutable.

Midnight accepts local source builds, digest-pinned container images, verified GitHub source links, and official database templates. Community templates have a separate immutable discovery and local-review boundary.

SourceOCI imageGitHub AppTemplates
On this page

LOCAL SOURCE

Deploy the current directory with midnight up.

Linked repositorybash
midnight status
midnight up

# Queue and return without following events
midnight up --detach
Package rules
Built-in exclusions, then .gitignore, then .midnightignore. Negations are supported, except .git and .midnight can never be included.
Upload limit
50 MiB compressed for a human-session source upload. Workspace retention and concurrent-upload quotas also apply.
Intake
The API records artifact ownership, deployment, operation, event, audit, and idempotent response before the worker builds it.
Follow mode
By default the CLI follows the operation event stream. --detach reports the queued identifiers immediately.

OCI

Pin production inputs by digest.

Image deployment rejects mutable tags such as :latest. Pass a complete lower-case SHA-256 digest reference so a retry or redeploy cannot silently select different bytes.

Immutable imagebash
midnight deploy image   --service-id svc_example   --environment-id env_example   --image registry.example/app@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

CONNECTED SOURCE

Link only repositories granted to the workspace.

  1. 1

    Install the Midnight GitHub App

    The installation operator registers the app and completes its callback configuration.

  2. 2

    Grant repositories

    The workspace can see only repositories explicitly included in its GitHub App installation grant.

  3. 3

    Select a branch

    Link the exact repository ID and branch to a service. Repository names are display data, not authority.

  4. 4

    Deploy deliberately

    Creating the link does not deploy. Start the first deployment from the console or CLI and inspect the returned operation.

GitHub discoverybash
midnight service github repositories
midnight service github branches --repository-id 123456
midnight service github link   --installation-id 1234   --repository-id 123456   --branch main

TEMPLATES

Keep official provisioning and community review distinct.

official
Built-in PostgreSQL, Redis, MySQL, and MongoDB templates use Midnight's verified, atomic database provisioning saga.
community
An upstream public GitHub template inspected at one exact commit with server-generated manifest, README, and SBOM provenance.
local
A project-owned editable fork that retains immutable upstream evidence and validation findings.
  1. 1

    Pin the source

    In New project → Template, enter a public GitHub repository and a full 40-character commit SHA. Branches, tags, redirects, credentials, and arbitrary hosts are rejected.

  2. 2

    Review provenance

    Inspect maintainer, SPDX license, security status, risk class, services, README, SBOM digest, and validation findings before forking.

  3. 3

    Fork and edit

    Create a project-owned local draft. Saves use a strong ETag so stale editors cannot overwrite newer work.

  4. 4

    Respect the apply boundary

    Community drafts do not create or deploy resources yet. Valid drafts will enter the staged atomic changeset path when that capability ships.

RELEASE STATE

Operate through new, auditable work.

redeploy
Replay the selected immutable image with the currently admitted service configuration.
rollback --previous
Create a new release from the preceding known deployment without erasing history.
restart
Queue a runtime restart for the linked service and environment.
stop
Queue the supported stop action while retaining deployment history.
cancel
Request cancellation for the latest queued or running linked deployment operation.
remove --deployment
Remove the selected runtime deployment through an explicit operation.