58 lines
2.2 KiB
Bash
58 lines
2.2 KiB
Bash
# Copy to .env for local development (docker compose reads it automatically).
|
|
|
|
# HTTP port the app listens on.
|
|
PORT=8080
|
|
|
|
# Display name shown in the UI / health payload.
|
|
APP_NAME=Miabi Guestbook
|
|
|
|
# Version shown in the UI / /api/info. Overrides the build-time version.
|
|
# Set to different values per app (e.g. 1.0.0 vs 2.0.0) for a canary demo.
|
|
# APP_VERSION=1.0.0
|
|
|
|
# Seed sample entries on first run (only when the table is empty). Set to
|
|
# false to start with an empty wall.
|
|
SEED=true
|
|
|
|
# === Database ======================
|
|
# Driver: "postgres" or "sqlite". Leave unset to auto-detect: Postgres when
|
|
# it is configured (DATABASE_URL or DB_HOST present), otherwise SQLite.
|
|
# DB_DRIVER=postgres
|
|
|
|
# SQLite (zero-config; used when no Postgres is configured). File path, or
|
|
# ":memory:" for an ephemeral database. The parent directory is created on
|
|
# startup. Locally this defaults to ./data/guestbook.db; the container image
|
|
# uses /data/guestbook.db (a volume). On Miabi, mount a volume at /data.
|
|
# DB_PATH=data/guestbook.db
|
|
|
|
# Postgres — when you attach a Miabi managed database, Miabi injects these for
|
|
# you. DATABASE_URL takes precedence; otherwise the discrete DB_* parts are
|
|
# assembled into a DSN.
|
|
DATABASE_URL=postgres://postgres:postgres@db:5432/guestbook?sslmode=disable
|
|
|
|
# Discrete parts (used only when DATABASE_URL is empty):
|
|
# DB_HOST=db
|
|
# DB_PORT=5432
|
|
# DB_USER=postgres
|
|
# DB_PASSWORD=postgres
|
|
# DB_NAME=guestbook
|
|
# DB_SSL_MODE=disable
|
|
|
|
# === Scaling / live updates ========
|
|
# Redis for cross-replica live updates and presence. Without it each replica
|
|
# only pushes to its own clients. On Miabi, attach a managed Redis with the
|
|
# "REDIS" env prefix and REDIS_DATABASE_URL is injected (also accepted).
|
|
# REDIS_URL=redis://redis:6379
|
|
|
|
# === Admin console =================
|
|
# Enables /admin. Store as a secret. Generate with: openssl rand -hex 16
|
|
# ADMIN_TOKEN=
|
|
|
|
# CIDRs whose X-Forwarded-For is trusted for the signer IP shown in /admin.
|
|
# Unset trusts the header as-is (fine behind the Miabi gateway).
|
|
# TRUSTED_PROXIES=10.0.0.0/8
|
|
|
|
# Expose /api/debug/* failure injection (crash, slow, 5xx, CPU, memory, logs).
|
|
# Still requires admin auth. Demo environments only.
|
|
# DEBUG_ENDPOINTS=false
|