Files
steffen 7a39ac494f
Build and Push backhaul-agent / build (push) Successful in 39s
agent image: add sqlite3 + sync v1.3 (SQLite file backups, chunked upload, metrics)
- sqlite3 in the image so the agent can back up SQLite files (Vaultwarden etc.) via .dump.
- Sync backhaul-agent.py to v1.3: sqlite engine (sqlite:<path> target), chunked upload
  (large dumps past the CDN cap), live metrics, self-update UA fix.
2026-08-11 16:14:35 +02:00

28 lines
1.4 KiB
Docker

# backhaul-agent — the public, containerized DB-backup client. Runs as a sidecar on a
# database's private Docker network: reaches the DB internally, pushes dumps home over HTTPS.
# No inbound ports. The agent logic is pure stdlib Python; this image just adds the DB dump
# tools and a once-a-minute cron.
FROM debian:bookworm-slim
# postgresql-client-17 from PGDG (Debian's default is 15, and pg_dump refuses a newer server
# major — nc-db and most modern Postgres are 17). default-mysql-client covers MySQL/MariaDB;
# sqlite3 lets the agent back up SQLite files (e.g. Vaultwarden) via `.dump`.
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates curl gnupg python3 cron default-mysql-client sqlite3; \
install -d /usr/share/postgresql-common/pgdg; \
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
-o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc; \
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" \
> /etc/apt/sources.list.d/pgdg.list; \
apt-get update; \
apt-get install -y --no-install-recommends postgresql-client-17; \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY backhaul-agent.py /app/backhaul-agent.py
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]