Fixed Dockerfile

This commit is contained in:
Anselme 2026-08-06 17:27:35 +02:00
parent 2a52d31295
commit c99ba42121
2 changed files with 7 additions and 7 deletions

View File

@ -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"]

View File

@ -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
- ${FOURAS_DATA_DIR}:/app/data