Skip to main content
You will ship the shop app from Build a Go and React app to production on Reliant hosting: the Go API, a migration job, a managed Postgres and the frontend, as one release. At the end the API answers on a public URL and forge obs check has judged it. The environment declares the database, and the platform fills DATABASE_URL in each workload at deploy time, so you never handle a connection string. Managed Postgres covers backups and restore.

Before you begin

  • The shop project from Build a Go and React app, with every change committed.
  • Forge v1.6.1 or later in the project (reliant forge --version). This guide ran at v1.6.1-0.20261115024114-0ab7c562e817.
  • Docker: the API image is built on your machine.
  • Reliant, signed in, in an organization with hosting billing.
1

See what prod will run

forge project new already declared a hosted prod environment in deploy/kcl/prod/main.k. List what it renders:
terminal
Output (trimmed)
migrate runs db migrate up before the rollout, api is every service in one process, web is the static frontend and shop is the database. What gets deployed explains each.
2

Cut a release

A release builds every artifact once and records its digest, so every later deploy of it ships the same bytes:
terminal
Output (trimmed)
--plan checks the cut without building. Use a version no other project in your organization has cut (Troubleshooting). Releases and promotion explains the model.
3

Deploy it

terminal
--yes approves the plan forge prints; --plan-only then --approve <digest> splits review from approval. The deploy waits for the rollout:
Output (trimmed)
It took about five minutes. identity: ready is the environment’s hosted sign-in instance.
4

Check the database and the migration

terminal
Output
The migration job has no failed run. db query runs a read-only, audited query (it needs the db:query grant):
terminal
Output
The table exists and is empty: seeding is dev-only.
5

Call the live API

Use the url api: the deploy printed:
terminal
Output
readyz reports the database connection, and the RPC refuses an unsigned caller because authentication is fail-closed. reliant forge env status prod confirms the running images match the release (3 match, 0 drifted).
6

Prove the release with obs check

Send the API some traffic, then judge the promotion:
terminal
It waits for the 15-minute window after the promotion to close. Then branch on exit_code:This first deploy returned exit 2 after 476 requests with no errors:
Output (trimmed)
The check compares the window after a promotion with the one before, and a new environment has no before, so this verdict is final. To judge the after window alone, drop the baseline requirement for one call:
terminal
That returned "verdict": "PASS", exit 0: no errors, new issues, alerts or restarts after the release. It cannot say “no worse than before”; your next release has a baseline. See forge obs.
7

Clean up

If this was a trial, delete the environment. Its database and data go with it, irreversibly, unless you pass --keep-data:
terminal
Output (trimmed)
A minute later curl https://maple-tern.reliantlabs.dev/healthz returned 404 Not found. The hosted project and its release images stay; no command deletes them.

What this does not do

  • It does not roll back. You recover by deploying an earlier release, and migrations run before every rollout, so keep them backward-compatible: Safe migrations.
  • It does not autoscale. The API runs one replica.
  • It does not decide who may call what. Access checks are handler code you write.
  • Backups need the platform’s backup storage to be ready: Managed Postgres.

Troubleshooting

Another project in your organization already cut this version: the images were pushed, but no release was recorded. This guide hit it with v0.1.0. Cut a version no other project has used.
You renamed the project in forge.yaml, so the image is built under the new name while the workloads declare the old one. Set the last part of image = "REPLACE-ME-REGISTRY.invalid/<name>" in deploy/kcl/workloads.k and each deploy/kcl/<env>/main.k to the new name, commit, and cut again.
The organization has no hosting billing. The deploy is recorded and waits; forge prints the billing URL, and once billing is active it goes live by itself, with nothing to re-run. Not reproduced here (this organization has billing). See Queued deploys.
No terminal to ask on and no --yes, or a dirty checkout: nothing was promoted. Commit, then re-run with --yes.

Next steps

Promote staging to production

Deploy the same release to staging first, then promote it by digest.

Gate prod on release health

Refuse a production promotion until staging’s check passes.

Managed Postgres

Backups, point-in-time restore and keeping data when you delete an environment.

Releases and promotion

Plans, approvals, compare-and-set promotions and rollback floors.