CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.21k stars 302 forks source link

Configuring with ENVs #165

Open warren-ru opened 2 years ago

warren-ru commented 2 years ago

As discussed I've made a few updates for providing some settings through environments. All settings from auth.yml can be now provided with envs.

warren-ru commented 2 years ago

Config files shouldn't be part of the Docker image. They should be provided externally instead. So example config files are copied while container building.

Linus045 commented 2 years ago

Please also run 'black' to fix the CI checks (see README.md).

see CI check log:

would reformat src/gateio_new_coins_announcements_bot/auth/gateio_auth.py
would reformat src/gateio_new_coins_announcements_bot/send_telegram.py
warren-ru commented 2 years ago

Please also run 'black' to fix the CI checks (see README.md).

see CI check log:

would reformat src/gateio_new_coins_announcements_bot/auth/gateio_auth.py
would reformat src/gateio_new_coins_announcements_bot/send_telegram.py

Done

warren-ru commented 2 years ago

We can add to the README an example of how to run the image with the config files mounted

warren-ru commented 2 years ago

We can add to the README an example of how to run the image with the config files mounted

It could be something like:

docker build -t gateio_cryptobot . && \
docker run --name crypto-bot -d --restart always \
     -v ~/gateio-bot/config.yml:/app/config.yml \
     -v ~/gateio-bot/old_coins.json:/app/old_coins.json \
     -v ~/gateio-bot/auth.yml:/app/auth/auth.yml \
     gateio_cryptobot

assuming config files are stored at ~/gateio-bot/