p0n1 / epub_to_audiobook

EPUB to audiobook converter, optimized for Audiobookshelf
MIT License
888 stars 86 forks source link

Ability to set options via Environment Variables in Docker Compose? #22

Closed crosbyh closed 5 months ago

crosbyh commented 7 months ago

Hi, this is a great project, thank you for creating it!

I am wondering if it is possible to set any of the configuration flags via Environment variables when using the docker compose file. I'm hoping to set things such as OPENAI_VOICE, OPENAI_MODEL, etc. via variables in the compose file or a .env file.

Thank you again!

p0n1 commented 7 months ago

Hi @crosbyh. Only service keys are exposed as environment variables as shown in https://github.com/p0n1/epub_to_audiobook/blob/main/docker-compose.example.yml. For openai_voice and openai_model, you need to pass them as command args. Like command: 'your_book.epub audiobook_output --tts openai --openai_voice xx --openai_model xx'.

p0n1 commented 5 months ago

Closing because no further issues.