Berth

Config

Config is environment variables. Changing them makes a new release from the current image (no rebuild), so it's live in a few seconds.

berth config:set myapp OPENAI_API_KEY=sk-… GREETING=hello
berth config:unset myapp GREETING
berth config:get myapp OPENAI_API_KEY
berth config:show myapp                 # secrets masked; --reveal to show them, --shell for KEY=value
berth config:import myapp .env          # add a .env file; --replace drops everything else
berth config:set myapp FOO=bar --no-restart     # save it now, use it on the next deploy

config:show hides anything ending in _KEY, _SECRET, _TOKEN or PASSWORD, plus DATABASE_URL and REDIS_URL.

Your app gets its variables when it runs, not when it builds. If the build really does need one (a public API URL baked into a frontend, say), mark it:

berth config:set myapp NEXT_PUBLIC_API_URL=https://api.example.com --build-arg

Settings for Berth itself

Variables starting with BERTH_ tune how Berth runs the app. Your app never sees them.

Variable Default What it does
BERTH_HEALTHCHECK / the path checked before traffic moves to a new release
BERTH_HEALTH_TIMEOUT 60 seconds to wait for it to get healthy
BERTH_DRAIN 5 seconds the old release keeps running after the switch
BERTH_MEMORY 512M memory limit (256M, 1G, …)
BERTH_CPUS 1 CPU limit
BERTH_KEEP_RELEASES 5 release images kept for rollback
BERTH_DOCKERFILE — Dockerfile path in the repo (or the --path subfolder)
BERTH_RELEASE_COMMAND Procfile release: command run before each release, usually migrations (more)
BERTH_RELEASE_TIMEOUT 600 seconds the release command gets
BERTH_RELEASE_BACKUP on off skips the Postgres backup before the release command
BERTH_CRON_TIMEOUT 3600 seconds a scheduled job gets
PORT 8080 the port your app listens on inside its container

Edit this page on GitHub (it's a section of the README)