From c99ba421211c9897c473fdbe449a39c49879fa4f Mon Sep 17 00:00:00 2001 From: Anselme Date: Thu, 6 Aug 2026 17:27:35 +0200 Subject: [PATCH] Fixed Dockerfile --- Dockerfile | 7 +++++-- docker-compose.yml | 7 ++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 55c7f98..bac314a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,11 @@ RUN apt-get update -q && \ # Create data directory with proper permissions RUN mkdir -p /app/data && chmod 755 /app/data +# Set safe directory +RUN RUN git config --global --add safe.directory '*' + # Clone the repository -RUN git clone --single-branch --branch master https://git.epicsparrow.com/Anselme/perefouras.git . +RUN git init /app && git remote add origin https://git.epicsparrow.com/Anselme/perefouras.git && git fetch --depth 1 origin master && git reset --hard FETCH_HEAD # Install dependencies RUN pip install --no-cache-dir -r requirements.txt @@ -26,4 +29,4 @@ RUN chmod +x main.py VOLUME /app/data # Command to update the repo and run the script -CMD ["sh", "-c", "cd /app && git pull origin master && python main.py"] +CMD ["sh", "-c", "cd /app && git fetch --depth 1 origin master && git reset --hard FETCH_HEAD && python main.py"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e37e82a..e328c8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,10 +5,7 @@ services: dockerfile: Dockerfile environment: - DISCORD_TOKEN=${FOURAS_DISCORD_TOKEN} - - MAINTAINER_ID=${FOURAS_MAINTAINER_ID:151626081458192384} + - MAINTAINER_ID=${FOURAS_MAINTAINER_ID:-151626081458192384} restart: always volumes: - - perefouras-data:/app/data - -volumes: - perefouras-data \ No newline at end of file + - ${FOURAS_DATA_DIR}:/app/data \ No newline at end of file