From a82489c95f8c8f3e55f92939224599598bd0de96 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 18:35:58 +0100 Subject: docker: build and run on Debian trixie Add a multi-stage image that compiles inside Debian trixie and runs on the same glibc/libssl/libopus, avoiding the Arch-built binary failing on Debian. The runtime image installs ffmpeg, qalc, the shared libraries, and the latest yt-dlp zipapp, and runs as uid 1000. compose.yaml mounts data/ and piper/, overrides TTS_MODEL_PATH for the container layout, and builds with host networking because the default Docker bridge DNS cannot resolve crates.io or deb.debian.org on this host. --- compose.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 compose.yaml (limited to 'compose.yaml') diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..eac326f --- /dev/null +++ b/compose.yaml @@ -0,0 +1,27 @@ +services: + senator-sperma: + build: + context: . + # This host's default Docker bridge DNS cannot resolve crates.io / + # deb.debian.org, so build on the host network. Remove this line if + # your Docker setup resolves DNS normally. + network: host + image: senator-sperma:latest + container_name: senator-sperma + restart: unless-stopped + init: true + env_file: + - .env + environment: + # The host .env points TTS_MODEL_PATH at an absolute host path, which + # does not exist inside the container. The model is mounted below. + TTS_MODEL_PATH: /app/piper + # Override if the bot should not use Polish local time for cron jobs. + # TZ: Europe/Warsaw + volumes: + - ./data:/app/data + - ./piper:/app/piper:ro + # If Copyparty runs on the host, uncomment so the container can reach it + # (then use http://host.docker.internal: in .env): + # extra_hosts: + # - "host.docker.internal:host-gateway" -- cgit v1.2.3