Discord bot for the Ashes Remain Tibia guild
- Docker
- Python 3
- nested-lookup
Build docker image
cd ashes-botsbt docker:publishLocal
Copy to server
docker imagesdocker save <image_id> | bzip2 | ssh bots docker load
On the server
- Member update loop
- Ensure that the directory structure is setup correctly:
mkdir -p $HOME/data/ashes-bot/{event,members} - Set up python environment with the required packages:
python -m venv .venv,source .venv/bin/activate,python -m pip install nested-lookup requests - Create members file:
touch $HOME/data/ashes-bot/members/ashes-remain.dat - Run the event update loop:
cd eventwhile true; do timeout 60 ./event.py ; sleep 60; done
- Ensure that the directory structure is setup correctly:
- Docker container
- Create an env file with the missing data from
src/main/resources/application.conf - Run the docker container, pointing to the env file created in step 1, changing user id if necessary:
docker run -d --env-file prod.env -v $HOME/data/ashes-bot:$HOME/data/ashes-bot --user $(id -u tom):$(id -g tom) -e JAVA_OPTS="-Xms192m -Xmx320m" --name ashes-bot ashes-bot:1.0.0
- Create an env file with the missing data from