Files
vibe-kanban/deploy/vibe-kanban-db.container
rob thijssen db061184bc deploy: bring the quadlets in from lair/containers
These describe how this repo's image is run; they belong with it rather
than in the third-party image repo. Captured from the live units on bob,
with the postgres password redacted out of the DSN.

Records the two things that are easy to get wrong and expensive to
rediscover: the db -> server -> electric ordering (the server's migrations
create the role and publication Electric attaches to, and Electric's
Requires= means a server restart stops it without bringing it back), and
the firewalld/aardvark interaction that presents as an auth failure.

Image= is a pinned immutable tag and AutoUpdate=registry is gone:
podman-auto-update.timer is enabled on bob, so a floating tag would let
the timer decide which build is running.
2026-07-21 15:54:35 +03:00

41 lines
1.4 KiB
Plaintext

# PostgreSQL for vibe-kanban.
#
# Deliberately NOT magrathea. magrathea is mTLS-only (`hostssl ... cert
# clientcert=verify-full map=cert_cn`, with `hostnossl ... reject`) and
# ElectricSQL cannot present a client certificate — it supports only
# sslmode=require/disable plus a CA file for verifying the *server*. Electric is
# not optional either: remote-server treats ELECTRIC_URL as mandatory. magrathea
# is also wal_level=replica, and Electric needs logical, which would mean
# restarting the shared primary. So this stack runs its own Postgres on a private
# podman network; nothing here is reachable from the LAN.
#
# Version tracks upstream's compose (postgres:16-alpine), not magrathea's 18.
# wal_level=logical is required by Electric's logical replication.
[Unit]
Description=vibe-kanban PostgreSQL
After=network-online.target
Wants=network-online.target
[Container]
Image=docker.io/library/postgres:16-alpine
ContainerName=vibe-kanban-db
AutoUpdate=registry
Network=vibe-kanban.network
Exec=postgres -c wal_level=logical
Volume=/var/lib/vibe-kanban/postgres:/var/lib/postgresql/data:Z
Environment=POSTGRES_DB=remote
Environment=POSTGRES_USER=remote
EnvironmentFile=/etc/vibe-kanban/env
HealthCmd=pg_isready -U remote -d remote
HealthInterval=5s
HealthTimeout=5s
HealthRetries=10
HealthStartPeriod=5s
[Service]
Restart=always
TimeoutStartSec=300
[Install]
WantedBy=multi-user.target