add dockerfile, readme

This commit is contained in:
churl
2022-01-19 16:35:40 +01:00
parent 2a1e48eb1a
commit 12927c01f9
2 changed files with 14 additions and 0 deletions

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
# syntax=docker/dockerfile:1
FROM python:3.10.1-slim-buster
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
CMD ["python3", "bot.py"]

6
README.md Normal file
View File

@ -0,0 +1,6 @@
The environment variables "DISCORD_TOKEN" and "DISCORD_GUILD" must be set to run the bot.
When run locally the boat loads an existing ".env"-file from the same directory as the script.
When running a docker container an ".env"-file can be loaded with "--env-file .env".
When run locally the quiz should be located in the same directory as the script.
When run from a docker container the folder containing the quiz should be mountet to "/quiz/" inside the container with "-v folder:/quiz".