# docker-compose.yml – XTTS2 TTS Server version: "3.9" services: redis: image: redis:7 container_name: redis restart: always ports: - "6379:6379" gateway: build: context: ./gateway dockerfile: Dockerfile container_name: tts-gateway restart: always environment: - REDIS_HOST=redis - GATEWAY_PORT=${GATEWAY_PORT} volumes: - ./gateway/voices:/app/voices - ./gateway/logs:/app/logs - ./gateway/port.txt:/app/port.txt ports: - "${GATEWAY_PORT:-8000}:${GATEWAY_PORT:-8000}" depends_on: - redis worker: build: context: ./worker dockerfile: Dockerfile container_name: tts-worker restart: always environment: - REDIS_HOST=redis - GPU_MODE=AUTO deploy: resources: reservations: devices: - capabilities: [gpu] volumes: - ./worker/voices:/app/voices - tts-models:/root/.local/share/tts depends_on: - redis volumes: tts-models: networks: default: name: wlkns-net