Vellum/compose.yml
mithral eb1ad6d920 Phase 0: skeleton, config, migrations, health check, container
Bootstraps Vellum as a single Go binary with one SQLite database.

- core: env-driven config, slog logging, SQLite (WAL) with pooled pragmas,
  embedded migration runner keyed on PRAGMA user_version
- migrations/0001_core.sql: identity, media, user state, infra. Media items
  are global; all per-user state (progress, favorites, grants) is a join.
  One polymorphic progress table covers every media kind.
- httpapi: request-ID, structured request logging, panic recovery, JSON
  endpoints for /healthz and /api/v1/version
- multi-arch Dockerfile (pure-Go SQLite, CGO_ENABLED=0) with an entrypoint
  that honours PUID/PGID like the rest of the self-hosted stack
- tests for migration idempotency, FK enforcement, WAL, config, middleware

Media does not exist yet. Nothing is exposed beyond health and version.
2026-10-09 16:26:08 -04:00

45 lines
1.3 KiB
YAML

# Vellum — one container, alongside the existing stack.
#
# Mounts match the conventions used elsewhere in this stack:
# :z SELinux relabel (mandatory on this host, getenforce = Enforcing)
# :ro the media library is read-only; Vellum never writes to it
#
# Paths here are the TARGET HOST's (/opt/mediaserver, /mnt/storage). They do
# not exist on the dev workstation — build locally with the Dockerfile instead.
services:
vellum:
build:
context: .
args:
VERSION: 0.1.0-dev
image: localhost/vellum:0.1.0-dev
container_name: vellum
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
environment:
- PUID=1001
- PGID=1001
- TZ=America/New_York
- VELLUM_LISTEN=:7788
- VELLUM_LOG_LEVEL=info
# Read-only library roots, colon-separated. Add comics/music/etc. as
# those modules land.
- VELLUM_MEDIA_DIRS=/media/ebooks:/media/comics
volumes:
- /opt/mediaserver/vellum/data:/data:z
- /opt/mediaserver/vellum/config:/config:z
- /mnt/storage/media:/media:ro,z
ports:
- 127.0.0.1:7788:7788
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"