Deployment #
HappyView requires a Postgres database and an AIP instance for OAuth. The Quickstart covers the fastest path with Railway. This page covers other deployment options.
Docker #
Build the image:
docker build -t happyview .
For local development, see Docker deployment.
Production Compose example #
:::note
This example omits Tap, which is required for real-time record streaming and backfill. See the full docker-compose.yml in the repository for a complete configuration including Tap.
:::
services:
postgres:
image: postgres:17
environment:
POSTGRES_USER: happyview
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: happyview
volumes:
- pgdata:/var/lib/postgresql/data
happyview:
image: happyview:latest
ports:
- "3000:3000"
environment:
DATABASE_URL: "postgres://happyview:${POSTGRES_PASSWORD}@postgres/happyview"
AIP_URL: "https://aip.example.com"
depends_on:
postgres:
condition: service_healthy
volumes:
pgdata:
Railway / Fly.io / other platforms #
The general process for any hosting platform:
- Provision a Postgres 17+ database
- Deploy an AIP instance (handles OAuth for your AppView)
- Set
DATABASE_URLandAIP_URLenvironment variables (see Configuration for all options) - Deploy the Docker image or build from source
- HappyView listens on
PORT(default3000) - Health check:
GET /healthreturnsok
For Railway specifically, the Quickstart template handles all of this with a single click.
Database #
Migrations run automatically on startup via sqlx::migrate!(). No manual migration step is needed.
TLS #
HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.) for HTTPS.
Logging #
HappyView uses the RUST_LOG environment variable to control log output. The default (happyview=debug,tower_http=debug) logs all HappyView activity and HTTP requests. For production, consider happyview=info,tower_http=info to reduce noise. See Configuration for details.