Skip to Content
Payload Bay

Single-container deployment

deploy/compose.single.yml runs Payload Bay as one application container plus PostgreSQL. The container holds the web server and the worker; either process ending stops the other, so the container restarts as a unit and never serves requests without a worker. It builds from source with public dependencies and needs no registry credentials, so any Docker host or a platform such as Coolify can run it.

Read the limits below before using it.

What works and what does not

FeatureSingle container
Stable ingress URL per source, raw body and headers stored before the 2xxYes
Forwarding to health-checked targets, failover, queueing, replayYes, see forwarding
Attempt inspection and manual replayYes
Scripted ingress and processing (sandboxed executor)No. The executor is not part of this image
Outbound runner and fan-outNot available yet

Scripted endpoints need the full operator installation, which adds the executor. Forwarding endpoints do not use it. Because no executor runs here, there is no script runtime to harden; an instance that must run customer scripts needs the separate executor service with a hardened runtime, see executor modes.

Configure

Set these as environment variables or in an env file kept outside Git.

SettingPurpose
PUBLIC_URLExternal HTTPS origin used for links and sign-in
POSTGRES_PASSWORDDatabase password
BETTER_AUTH_SECRET, PAYLOADBAY_ENCRYPTION_KEY, PAYLOADBAY_BOOTSTRAP_SECRETIndependent secrets of at least 32 characters. Keep the encryption key with your backups: stored target headers and secrets cannot be read without it
EMAIL_FROMSender address, on a domain you control and have verified. SMTP_FROM is the older name and is still accepted
USESEND_BASE_URL, USESEND_API_KEYSend through a useSend server's HTTP API. Selected when the key is set, and takes precedence over SMTP
SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASSWORDSend through any SMTP server instead. SMTP_SECURE is true for implicit TLS (usually port 465) and false for STARTTLS (usually port 587)

Configure exactly one email transport. Sign-in uses one-time codes sent by email, so mail delivery is required. The useSend path checks that the server is reachable but cannot check the key without sending a message; a wrong key shows up as a failed send. A complete, commented example is in .env.example.

Generate each secret with openssl rand -hex 24.

Registration is invitation-only by default. The first owner is created with the one-time bootstrap secret, see Create the first owner.

Run

docker compose --env-file /secure/payloadbay.env -f deploy/compose.single.yml up -d --build

Put a TLS-terminating reverse proxy in front of port 3000 of the payload-bay service. On Coolify, create a Docker Compose application from this repository, select deploy/compose.single.yml, set the variables above, and assign your domain to the payload-bay service on port 3000. The postgres and schema services need no domain.

The container reports healthy once the web server answers. The compose file sets a read-only root filesystem, drops all capabilities and disables privilege escalation.

Schema and upgrades

The one-shot schema service runs the same migrator image as the operator stack. It applies the reviewed release migrations in order: a fresh database is created, an existing database is upgraded with its data intact, and a second run changes nothing. It refuses, before changing anything, a database that is newer than the image or whose migration history is inconsistent, and the application does not start. Migrations are forward-only; rollback is a restore from backup.

Back up before every upgrade (see backup) and follow upgrading an existing installation. A database that an earlier build initialized with the development push has no migration history; the migrator names that condition and requires an explicit baseline, described there.

Backup

The data lives in the postgres volume. Back it up with the procedure in backup, together with the encryption key.

Deploy a published image

deploy/compose.single.image.yml has the same services, volumes and settings as compose.single.yml, but runs published images instead of building from source, so the host needs only that file. The images are built and published by the single-container image workflow when a maintainer publishes a GitHub Release, for linux/amd64 and linux/arm64, with an SBOM, provenance attestations and OCI labels (source, version, revision, license AGPL-3.0-only). See single-container image publication for the naming scheme, tags and the maintainer procedure.

Set both references to the same release. The defaults point at the first alpha and are never latest:

VariableDefault
PAYLOADBAY_IMAGEghcr.io/payloadbay/payloadbay:0.1.0-alpha.1
PAYLOADBAY_MIGRATOR_IMAGEghcr.io/payloadbay/payloadbay-migrator:0.1.0-alpha.1

Pin by version, or better by digest (the digests are in the release's workflow run summary and in docker buildx imagetools inspect):

PAYLOADBAY_IMAGE=ghcr.io/payloadbay/payloadbay:0.1.0-alpha.1@sha256:<digest> \
PAYLOADBAY_MIGRATOR_IMAGE=ghcr.io/payloadbay/payloadbay-migrator:0.1.0-alpha.1@sha256:<digest> \
docker compose --env-file /secure/payloadbay.env -f deploy/compose.single.image.yml up -d

On Coolify, select deploy/compose.single.image.yml instead and set the two variables. To upgrade, back up, change the two references and redeploy; the schema service migrates the database first. To roll back, see rollback. Until the first release is published and its packages are public, the pull fails: build from source as described above.

Edit this page

On this page