aiogram / telegram-bot-api

Docker image of Telegram Bot API Server
https://hub.docker.com/r/aiogram/telegram-bot-api
165 stars 49 forks source link

Add docker secrets support for TELEGRAM_API_HASH and TELEGRAM_API_ID #19

Closed jieggii closed 3 weeks ago

jieggii commented 3 months ago

Hi, Thank you for maintaining this useful Docker image!

I would like to propose adding TELEGRAM_API_HASH_FILE and TELEGRAM_API_ID_FILE environmental variables support to this image, so that users could provide a path to a docker secret file mounted to the running container instead of providing those sensitive values as environmental variables.

For example, instead of setting

image users could create docker secrets for those sensitive values and set

This approach is pretty common in some database images: for example, Postgres and Mongo images enable users to use such environmental variables as POSTGRES_USER_FILE, POSTGRES_PASSWORD_FILE, MONGO_INITDB_ROOT_USERNAME_FILE and so on to handle sensitive data securely.

If the maintainer supports this proposal, I’m happy to contribute to implementing it.

JrooTJunior commented 3 months ago

It would be nice to have this feature