A minimal guestbook: an Express web UI backed by Postgres. One container, one database — the smallest realistic shape of a deployable web app. Useful as a test fixture for deploy-from-GitHub flows.
server.js— web UI + API, listens on$PORT(default 3000), readsDATABASE_URLDockerfile— production image (EXPOSE 3000)docker-compose.yml— local dev stack (web + Postgres).env.example— the one required environment variable
The schema is created automatically on boot (CREATE TABLE IF NOT EXISTS),
with retries in the background — the server starts serving immediately even if
the database is still waking up. /healthz reports both states.
docker compose up --build
# open http://localhost:3000Or without Docker (needs a running Postgres):
npm install
DATABASE_URL=postgres://user:pass@localhost:5432/guestbook npm startinsta project create guestbook
insta services add postgres db
insta services add compute app
insta secrets bind DATABASE_URL postgres/db --to compute/app
insta deploy . --port 3000Or point the console's Deploy from GitHub flow at this repo: it should
detect exactly one service (this app, port 3000) and suggest DATABASE_URL;
add a Postgres service and bind it, then deploy.