Skip to content

Dashstrom/easterobot

Repository files navigation

Easterobot

Discord bot for Easter.

Download source

git clone https://github.com/Dashstrom/easterobot
cd easterobot

Edit configuration

cp easterobot/data/config.yml.exemple easterobot/data/config.yml
nano easterobot/data/config.yml

How to install docker

On rasbian run these command before install docker :

sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo reboot

Install docker from script

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker "${USER}"
sudo apt remove docker-ce
pip3 install docker-compose

Some usefull commands

docker compose up -d --build
docker compose logs -f
docker compose exec bot bash
docker compose stop
docker compose down --volumes --rmi 'all'

Generate images

pip3 install requirements-tools.txt
python3 tools/cropping.py images/eggs.png images/eggs -s 13

Run test

pip3 install requirements-dev.txt
isort .
black .

Update

docker compose stop
git pull
nano easterobot/data/config.yml
docker compose up -d --build

Backups

Export backups

docker compose stop
docker run --rm -v "easterobot_database:/database" -v "easterobot_logs:/logs" -v "$PWD":/backup ubuntu tar czvf /backup/backup.tar.gz -C / database logs 
docker compose up -d

Import backups

docker compose stop
docker run --rm -v "easterobot_database:/database" -v "easterobot_logs:/logs" -v "$PWD":/backup ubuntu bash -c "cd / && rm -rf /{database,logs}/* && tar xvfP /backup/backup.tar.gz"
docker compose up -d

Releases

No releases published

Packages

No packages published