services:
  voicevox:
    image: voicevox/voicevox_engine:cpu-ubuntu20.04-latest
    container_name: voicevox
    restart: unless-stopped
    ports:
      - "${VOICEVOX_PORT:-50021}:50021"
    environment:
      - VV_CPU_NUM_THREADS=${VV_CPU_NUM_THREADS:-4}
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:50021/version"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 30s
