franciscod / telegram-twitter-forwarder-bot

A Telegram bot that forwards Tweets
GNU Lesser General Public License v3.0
317 stars 116 forks source link

Add .env file for Docker environment values #67

Closed PRIHLOP closed 3 years ago

PRIHLOP commented 3 years ago

Copy env_dist to .env and fill environment values.

franciscod commented 3 years ago

Thanks for your help!

I never used the restart option, could you describe a bit what does this change do? I assume it's useful but it would be good documentation for other users (as well as for me!)

Also the environment vars are now declared across three different files: .env, env_dist, docker-compose.yml. How is this better than the existing solution?

PRIHLOP commented 3 years ago

Hello. restart option is used for restart container on failure, or after server shutdown/reboot. Container with this option can acts like a daemon. More information you can read by this link.

File .env is added to .gitignore and can contain your production/dev variables. If you need to update local code from repository you don't need to change some in docker-compse.yml file or stash local changes. It make updates more simple and secure(also you can make push, if you need it). File env_dist is used as example with comments for filling variables in .env file.