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>
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
services:
|
|
tts-voice-creator-clone-and-design-2:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: tts-voice-creator-clone-and-design-2:latest
|
|
container_name: tts-voice-creator-clone-and-design-2
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
- "7890:7890"
|
|
|
|
# Give the app user access to the Docker socket (GID of docker group on host)
|
|
group_add:
|
|
- "${DOCKER_GID:-988}"
|
|
|
|
volumes:
|
|
- ${VOICE_HOST_DIR:-./voices}:/voices:rw
|
|
- ./config:/home/app/.config/tts-voice-creator:rw # settings, presets, routes
|
|
- ./logs:/logs:rw # application logs
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./static:/app/static:ro
|
|
- ./server.py:/app/server.py:ro
|
|
- ./core:/app/core:ro
|
|
- ./routes:/app/routes:ro
|
|
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- VOICES_DIR=/voices
|
|
- OUTPUT_DIR=/voices/active_voices
|
|
# Containers that load WAV files and need a restart after voice changes
|
|
- 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
|