rayzrdev / Gameboi

A simple Discord bot made for Discord Hack Week 2019 with a plethora of small games you can play, as well as a global currency and rewards system!
MIT License
81 stars 13 forks source link

Add basic Dockerfile #9

Closed rayzr522 closed 2 years ago

rayzr522 commented 3 years ago

build with .deploy/build.sh and run with:

docker run --rm -it -v $(pwd)/data:/var/gameboi rayzr522/gameboi
# or if you want it to run in the background and not be removed after it exits:
docker run -v $(pwd)/data:/var/gameboi rayzr522/gameboi
this assumes a `data` folder in your current directory, and gameboi will generate a config.yml for you

the only problem as it stands is that the bot runs as a root, meaning your data folder will be owned by root and so will your config.yml. one easy solution to this is to run the bot the first time to generate data/config.yml, and then run this to fix perms:
```bash
sudo chown -R $(whoami):$(whoami) data

it's not a great solution but it at least works