tts-voice-creator-clone-and.../portainer-stack.yml
mARTin-B78 7f35d32f3e Replace named Docker volume with local bind-mount folders
config/ and logs/ are now host directories visible on the filesystem.

- docker-compose.yml: ./config → /home/app/.config/tts-voice-creator:rw
                      ./logs   → /logs:rw
  Named volume tts-voice-creator-clone-and-design-2 removed.
- portainer-stack.yml: same change with absolute host paths.
- server.py: RotatingFileHandler writes INFO+ to /logs/app.log
  (maxBytes=5MB, backupCount=3). Falls back gracefully if /logs
  is not writable.
- .gitignore: track config/ and logs/ dirs via .gitkeep but exclude
  settings.json, *.log and backups from version control.

Benefits:
- Settings and logs are human-readable on the host at any time
- Survives docker-compose down -v (was lost with named volume)
- Easy backup: cp -r config/ logs/ to any destination
- Can edit settings.json directly if needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 15:31:46 +02:00

55 lines
2.4 KiB
YAML

# ─────────────────────────────────────────────────────────────────────────────
# TTS Voice Creator - Clone and Design 2 — Portainer Stack
#
# IMPORTANT: build the image on the host before deploying / updating this stack:
#
# cd /home/sparky/Docker/tts-voice-creator-clone-and-design-2
# docker build -t tts-voice-creator-clone-and-design-2:latest .
#
# Then paste this file into Portainer → Stacks → Add stack → Web editor
# (or update the existing stack).
#
# After any Python code change (core/ or routes/) you must redeploy this stack
# or rebuild the image — a plain container restart is not enough.
# ─────────────────────────────────────────────────────────────────────────────
services:
tts-voice-creator-clone-and-design-2:
image: tts-voice-creator-clone-and-design-2:latest
container_name: tts-voice-creator-clone-and-design-2
restart: unless-stopped
ports:
- "7890:7890"
group_add:
- "988"
volumes:
- /home/sparky/Projekte/TTS_Voices:/voices:rw
- /home/sparky/Docker/tts-voice-creator-clone-and-design-2/config:/home/app/.config/tts-voice-creator:rw
- /home/sparky/Docker/tts-voice-creator-clone-and-design-2/logs:/logs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
# ── Hot-reload mounts (changes apply on container recreate, not restart) ──
- /home/sparky/Docker/tts-voice-creator-clone-and-design-2/server.py:/app/server.py:ro
- /home/sparky/Docker/tts-voice-creator-clone-and-design-2/core:/app/core:ro
- /home/sparky/Docker/tts-voice-creator-clone-and-design-2/routes:/app/routes:ro
- /home/sparky/Docker/tts-voice-creator-clone-and-design-2/static:/app/static:ro
environment:
- PYTHONUNBUFFERED=1
- VOICES_DIR=/voices
- OUTPUT_DIR=/voices/active_voices
- TTS_CONTAINER_NAMES=faster-qwen3-tts-voiceclone,faster-qwen3-tts-streaming
- VOICE_DESIGN_MODEL=Qwen3-TTS-12Hz-1.7B-VoiceDesign
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- dgx_net
networks:
dgx_net:
external: true