From 2a52d31295f0e28470fd7deefaf5d96a6315cd04 Mon Sep 17 00:00:00 2001 From: Anselme Date: Thu, 6 Aug 2026 16:51:04 +0200 Subject: [PATCH] Updated dockerfile --- Dockerfile | 6 ++++++ docker-compose.yml | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index ce5bc56..55c7f98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update -q && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* +# Create data directory with proper permissions +RUN mkdir -p /app/data && chmod 755 /app/data + # Clone the repository RUN git clone --single-branch --branch master https://git.epicsparrow.com/Anselme/perefouras.git . @@ -19,5 +22,8 @@ RUN pip install --no-cache-dir -r requirements.txt # give exec permissions to main RUN chmod +x main.py +# Set data directory as volume mount point +VOLUME /app/data + # Command to update the repo and run the script CMD ["sh", "-c", "cd /app && git pull origin master && python main.py"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e37e82a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +services: + perefouras: + build: + context: . + dockerfile: Dockerfile + environment: + - DISCORD_TOKEN=${FOURAS_DISCORD_TOKEN} + - MAINTAINER_ID=${FOURAS_MAINTAINER_ID:151626081458192384} + restart: always + volumes: + - perefouras-data:/app/data + +volumes: + perefouras-data \ No newline at end of file