diff options
Diffstat (limited to '')
| -rw-r--r-- | README.md | 41 |
1 files changed, 41 insertions, 0 deletions
| @@ -56,6 +56,47 @@ bot falls back to Google Translate TTS. | |||
| 56 | cargo run --release | 56 | cargo run --release |
| 57 | ``` | 57 | ``` |
| 58 | 58 | ||
| 59 | ## Docker | ||
| 60 | |||
| 61 | The image builds and runs on Debian trixie, so it does not depend on the | ||
| 62 | host's gcc/glibc version. This is the recommended way to deploy on Debian | ||
| 63 | when developing on a rolling-release distro. | ||
| 64 | |||
| 65 | ```bash | ||
| 66 | docker compose up -d --build | ||
| 67 | ``` | ||
| 68 | |||
| 69 | Or without Compose: | ||
| 70 | |||
| 71 | ```bash | ||
| 72 | docker build -t senator-sperma . | ||
| 73 | docker run -d --name senator-sperma --restart unless-stopped \ | ||
| 74 | --env-file .env \ | ||
| 75 | -e TTS_MODEL_PATH=/app/piper \ | ||
| 76 | -v "$PWD/data:/app/data" \ | ||
| 77 | -v "$PWD/piper:/app/piper:ro" \ | ||
| 78 | senator-sperma | ||
| 79 | ``` | ||
| 80 | |||
| 81 | Notes: | ||
| 82 | |||
| 83 | - `data/` holds the SQLite database and is mounted for persistence. Create it | ||
| 84 | first (`mkdir -p data`) so it is owned by your user rather than root. | ||
| 85 | - `piper/` holds the Piper model and is mounted read-only; the container | ||
| 86 | overrides `TTS_MODEL_PATH` to `/app/piper`, so the absolute host path in | ||
| 87 | `.env` is harmless. Put the `.onnx` and `.onnx.json` files there (the same | ||
| 88 | directory used for local runs). | ||
| 89 | - The container runs as uid 1000. Make sure `data/` is writable by that uid. | ||
| 90 | - `TZ` defaults to `Europe/Warsaw` for cron jobs; override it in | ||
| 91 | `compose.yaml` or with `-e TZ=...` if needed. | ||
| 92 | - If Copyparty runs on the host, use `http://host.docker.internal:<port>` in | ||
| 93 | `.env` and enable the commented `extra_hosts` entry in `compose.yaml`. | ||
| 94 | - If the build fails to resolve `crates.io` or `deb.debian.org`, run | ||
| 95 | `docker build --network=host -t senator-sperma .`; `compose.yaml` already | ||
| 96 | sets `network: host` for builds on this host. | ||
| 97 | - yt-dlp is fetched from the latest upstream release at image build time. | ||
| 98 | Rebuild with `--no-cache` (`docker compose build --no-cache`) to refresh it. | ||
| 99 | |||
| 59 | ## Commands | 100 | ## Commands |
| 60 | 101 | ||
| 61 | Slash commands are autoregistered globally on startup. Some are registered | 102 | Slash commands are autoregistered globally on startup. Some are registered |
