From 12927c01f9ec981ef955f46e3d998b34e9680f4c Mon Sep 17 00:00:00 2001 From: churl Date: Wed, 19 Jan 2022 16:35:40 +0100 Subject: [PATCH] add dockerfile, readme --- Dockerfile | 8 ++++++++ README.md | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d687b0e --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c7ad54 --- /dev/null +++ b/README.md @@ -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".