Deployment #
HappyView requires a database. SQLite is the default; Postgres is also supported, but requires additional setup. 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.
:::
Using SQLite (default):
services:
happyview:
image: happyview:latest
ports:
- "3000:3000"
environment:
DATABASE_URL: "sqlite://data/happyview.db?mode=rwc"
PUBLIC_URL: "https://happyview.example.com"
SESSION_SECRET: "${SESSION_SECRET}"
volumes:
- happyview-data:/app/data
volumes:
happyview-data:
Using Postgres:
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"
PUBLIC_URL: "https://happyview.example.com"
SESSION_SECRET: "${SESSION_SECRET}"
depends_on:
postgres:
condition: service_healthy
volumes:
pgdata:
Railway / Fly.io / other platforms #
The general process for any hosting platform:
- Choose a database: SQLite (default, zero setup) or Postgres 17+ (provision separately)
- Set
DATABASE_URL,PUBLIC_URL, andSESSION_SECRETenvironment variables (see Configuration for all options) - Deploy the Docker image or build from source
- HappyView listens on
PORT(default3000) - Health check:
GET /healthreturnsok
See the database setup guide for details on both backends.
For Railway specifically, the Quickstart template handles all of this with a single click.
Database #
HappyView supports SQLite (default) and Postgres. The backend is auto-detected from the DATABASE_URL scheme (sqlite:// or postgres://). Migrations run automatically on startup. No manual migration step is needed. See the database setup guide for details.
TLS #
HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.) for HTTPS. Make sure PUBLIC_URL matches the public-facing URL (including 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.