Closed karbowiak closed 6 years ago
If you need to manually build the container, either because of development - or because you can't use the public docker hub (or because the container doesn't exist) then just do the following steps
docker build --no-cache -t shibdib/firetail .
To install the container, you either need to build it manually, or rely on the images built by docker hub. To install and run the container simply do the following
docker run -it --rm -v /etc/firetail:/config shibdib/firetail
docker run -it --rm -v /etc/firetail:/config shibdib/firetail
command - then you will see the invite url, save this so you can invite the bot to your server(s)ctrl-c
out of the container, and run docker create --name firetail -v /etc/firetail:/config --restart always shibdib/firetail
and then docker start firetail
- now you have a working container, that is always runningYou can manually update the container - albeit it's a bit cumbersome
docker stop firetail
docker rm firetail
docker pull shibdib/firetail
THIS STEP CAN BE REPLACED WITH THE MANUAL BUILD IF YOU WANTdocker create --name firetail -v /etc/firetail:/config --restart always shibdib/firetail
docker start firetail
However if you just want it to automatically update as soon as there is a new build on docker hub - you can use Watchtower (It also updates all your other containers - so beware of this
docker create --name watchtower --restart=always -v /var/run/docker.sock:/var/run/docker.sock -e WATCHTOWER_CLEANUP=true v2tec/watchtower
docker start watchtower
And that's it :)
@shibdib just beware that the whole docker hub stuff hinges on you setting it up - otherwise users can only do manual builds :(
Basically you can now define the config path and logFile path at runtime.
Example:
CONFIG=/config LOG=/config/bot.log python3 firetail
If they are not set - it will default to use the config.py located inside ./firetail/If the CONFIG= environmental variable is set, it will check if the file exists - and if not, copy the example_config.py to the config.py path specified, and exit.
And yes, the copyfile path is hardcoded - because os.getcwd() doesn't work inside a docker container, and i assume docker containers is the only place where it'll see any use :P
Will look into a fix for it if need be