diff --git a/CHANGELOG.md b/CHANGELOG.md index 615c628..c4cab7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ### Fixed +- **`No module named 'core'` on container restart** — `docker restart` reuses + the old container configuration and never applies new volume mounts from + `docker-compose.yml`. Added a comment to `portainer-stack.yml` and updated + it to include `core:/app/core:ro` and `routes:/app/routes:ro`. Solution is + `docker compose up -d` (recreates the container) not `docker restart`. + - **Text-input turns returned 422** — `UploadFile | None = File(None)` with `from __future__ import annotations` caused FastAPI to treat `audio` as a required field even when omitted. Changed to `Optional[UploadFile] = None` diff --git a/portainer-stack.yml b/portainer-stack.yml index d8291a6..37c994d 100644 --- a/portainer-stack.yml +++ b/portainer-stack.yml @@ -1,37 +1,45 @@ # ───────────────────────────────────────────────────────────────────────────── -# TTS Voice Creator - Clone and Design — Portainer Stack +# TTS Voice Creator - Clone and Design 2 — Portainer Stack # -# IMPORTANT: build the image on the host before deploying this stack: +# IMPORTANT: build the image on the host before deploying / updating this stack: # -# docker build -t tts-voice-creator-clone-and-design:latest /home/sparky/Docker/tts-voice-creator-clone-and-design/ +# 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. +# 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: - image: tts-voice-creator-clone-and-design:latest - container_name: tts-voice-creator-clone-and-design + 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: - - "7860:7860" - - volumes: - - /home/sparky/Projekte/TTS_Voices:/voices:rw - - tts-voice-creator-clone-and-design:/home/app/.config/voice-clone-factory - - /home/sparky/Docker/tts-voice-creator-clone-and-design/static:/app/static:ro - - /var/run/docker.sock:/var/run/docker.sock + - "7890:7890" group_add: - "988" + volumes: + - /home/sparky/Projekte/TTS_Voices:/voices:rw + - tts-voice-creator-clone-and-design-2:/home/app/.config/tts-voice-creator + - /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_NAME=faster-qwen3-tts-voiceclone - - TTS_STREAM_URL=http://host.docker.internal:8023 + - TTS_CONTAINER_NAMES=faster-qwen3-tts-voiceclone,faster-qwen3-tts-streaming - VOICE_DESIGN_MODEL=Qwen3-TTS-12Hz-1.7B-VoiceDesign extra_hosts: @@ -40,9 +48,8 @@ services: networks: - dgx_net - volumes: - tts-voice-creator-clone-and-design: + tts-voice-creator-clone-and-design-2: networks: dgx_net: