Files
loki/infra/postgres-host/docker-compose.yml
CatoandClaude Fable 5.1 95c40a9cd8 refactor: rename the product from FleetCrown to Loki (#695)
The product, its assistant, the repo, the host and every unit on the box now
share one name. 638 files, ~3,000 mentions: UI copy, config, env keys
(FLEETCROWN_* -> LOKI_*), systemd units (fleetcrown-* -> loki-*), docs,
articles, the deploy workflow other repos reuse, and nine file names.

- Three article slugs carried the old name and had been shared; permanent
  redirects keep those links alive (next.config.ts).
- test-no-retired-name.sh now also forbids the old product name across the
  whole repo, so the rename cannot creep back through templates and examples.
- ASSISTANT_STACK collapses the product and the assistant into one entry,
  because they are now the same name.

Infra was cut over ahead of this merge: /opt/loki, loki-* units, the `loki`
database and role, loki.orangecat.ch (old host 308s to it; /api, /widget,
/embed keep proxying), GitHub repos bitbaum/loki and bitbaum/loki-releases.
The Resend sending domain stays fleetcrown.orangecat.ch until the new domain
is verified in DNS.


Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:13:10 -07:00

50 lines
1.5 KiB
YAML

# Self-hosted Postgres for Loki + studio apps (Hetzner VPS).
# Run on a VM with: docker compose up -d
#
# Note: Loki production runs Postgres 17 directly on the Hetzner host
# (not this container) — see docs/infrastructure/hetzner-migration.md. This
# compose file remains a portable way to stand up Postgres + PgBouncer on any
# fresh VM (the dump/restore target in docs/infrastructure/postgres-portability.md).
#
# Expose:
# :5432 direct → DATABASE_URL (migrations, LISTEN/NOTIFY)
# :6432 pool → DATABASE_POOL_URL (pooled runtime queries)
#
# See docs/infrastructure/postgres-portability.md
services:
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-studio}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
volumes:
- pg_data:/var/lib/postgresql/data
- ./init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-studio}"]
interval: 5s
timeout: 3s
retries: 10
ports:
- "127.0.0.1:5432:5432"
pgbouncer:
image: edoburu/pgbouncer:v1.24.1-p1
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-studio}:${POSTGRES_PASSWORD}@postgres:5432/cockpit
POOL_MODE: transaction
MAX_CLIENT_CONN: 200
DEFAULT_POOL_SIZE: 20
AUTH_TYPE: scram-sha-256
ports:
- "127.0.0.1:6432:5432"
volumes:
pg_data: