From eaf92abff079d9ebb863c4ee22f1e8940e62183a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselme=20Fran=C3=A7ois?= Date: Thu, 23 Jan 2025 15:01:40 +0000 Subject: [PATCH] added dockerfile for bot hosting --- docker/Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..ce5bc56 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,23 @@ +# Dockerfile +FROM python:3.9-slim + +# Set the working directory +WORKDIR /app + +# Install git and clean up +RUN apt-get update -q && \ + apt-get install -y git && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Clone the repository +RUN git clone --single-branch --branch master https://git.epicsparrow.com/Anselme/perefouras.git . + +# Install dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# give exec permissions to main +RUN chmod +x main.py + +# Command to update the repo and run the script +CMD ["sh", "-c", "cd /app && git pull origin master && python main.py"]