Files
containers/images/vibe-kanban-remote/vibe-kanban-electric.container
rob thijssen 3619470d79
Some checks failed
images / hermes (push) Failing after 17m32s
images / vibe-kanban-remote (push) Successful in 21m35s
docs(vibe-kanban-remote): commit the deployed quadlets
Mirrors the hermes convention of keeping the consuming quadlet alongside the
image definition. Four units: a private network, postgres 16 with
wal_level=logical, remote-server, and electric.

Records why the start order matters -- remote-server's migrations create the
electric_sync role, its grants and the publication that electric then connects
with, so electric cannot come up first -- and why electric has its own env
file, which is to avoid depending on systemd expanding one Environment= value
into another inside a quadlet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TsmUEtbyTkgQ18tCFYXo1h
2026-07-20 18:26:25 +03:00

46 lines
1.9 KiB
Plaintext

# ElectricSQL sync service for vibe-kanban.
#
# Electric streams Postgres logical replication to the browser. remote-server
# treats ELECTRIC_URL as mandatory, so this is not optional.
#
# Starts AFTER vibe-kanban.service because the `electric_sync` role, its grants
# and the publication are created by remote-server's migrations — Electric cannot
# connect until they exist, and remote-server also sets that role's password on
# start. vibe-kanban.service uses Notify=healthy, so this really does wait.
#
# ELECTRIC_INSECURE mirrors upstream's own production compose and is contained:
# Electric publishes no host port and is reachable only by container name on the
# private vibe-kanban bridge. An `electric-secret` exists in pass if we later want
# to set ELECTRIC_SECRET here and on remote-server.
[Unit]
Description=vibe-kanban ElectricSQL sync
After=network-online.target vibe-kanban.service
Wants=network-online.target
Requires=vibe-kanban.service
[Container]
Image=docker.io/electricsql/electric:1.4.13
ContainerName=vibe-kanban-electric
AutoUpdate=registry
Network=vibe-kanban.network
Volume=/var/lib/vibe-kanban/electric:/app/persistent:Z
# Its own env file (not the shared one) so the variable can simply be named
# DATABASE_URL — what Electric reads — without colliding with remote-server's
# SERVER_DATABASE_URL, and with no reliance on systemd expanding one Environment=
# value into another, which quadlets do not do dependably.
EnvironmentFile=/etc/vibe-kanban/electric.env
Environment=PG_PROXY_PORT=65432
Environment=LOGICAL_PUBLISHER_HOST=vibe-kanban-electric
Environment=AUTH_MODE=insecure
Environment=ELECTRIC_INSECURE=true
Environment=ELECTRIC_MANUAL_TABLE_PUBLISHING=true
Environment=ELECTRIC_USAGE_REPORTING=false
Environment=ELECTRIC_FEATURE_FLAGS=allow_subqueries,tagged_subqueries
[Service]
Restart=always
TimeoutStartSec=300
[Install]
WantedBy=multi-user.target