aboutsummaryrefslogtreecommitdiffstats
path: root/compose.yaml
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 18:35:58 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 18:35:58 +0100
commita82489c95f8c8f3e55f92939224599598bd0de96 (patch)
tree59591c88cede5a3aef8255fad713ddd9b329709c /compose.yaml
parentmusic: group playback commands under /music (diff)
downloadsenator-sperma-a82489c95f8c8f3e55f92939224599598bd0de96.tar.gz
senator-sperma-a82489c95f8c8f3e55f92939224599598bd0de96.zip
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.
Diffstat (limited to '')
-rw-r--r--compose.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/compose.yaml b/compose.yaml
new file mode 100644
index 0000000..eac326f
--- /dev/null
+++ b/compose.yaml
@@ -0,0 +1,27 @@
1services:
2 senator-sperma:
3 build:
4 context: .
5 # This host's default Docker bridge DNS cannot resolve crates.io /
6 # deb.debian.org, so build on the host network. Remove this line if
7 # your Docker setup resolves DNS normally.
8 network: host
9 image: senator-sperma:latest
10 container_name: senator-sperma
11 restart: unless-stopped
12 init: true
13 env_file:
14 - .env
15 environment:
16 # The host .env points TTS_MODEL_PATH at an absolute host path, which
17 # does not exist inside the container. The model is mounted below.
18 TTS_MODEL_PATH: /app/piper
19 # Override if the bot should not use Polish local time for cron jobs.
20 # TZ: Europe/Warsaw
21 volumes:
22 - ./data:/app/data
23 - ./piper:/app/piper:ro
24 # If Copyparty runs on the host, uncomment so the container can reach it
25 # (then use http://host.docker.internal:<port> in .env):
26 # extra_hosts:
27 # - "host.docker.internal:host-gateway"