Updated dockerfile

This commit is contained in:
Anselme 2026-08-06 16:51:04 +02:00
parent 51496646f4
commit 2a52d31295
2 changed files with 20 additions and 0 deletions

View File

@ -10,6 +10,9 @@ RUN apt-get update -q && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Create data directory with proper permissions
RUN mkdir -p /app/data && chmod 755 /app/data
# Clone the repository # Clone the repository
RUN git clone --single-branch --branch master https://git.epicsparrow.com/Anselme/perefouras.git . 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 # give exec permissions to main
RUN chmod +x main.py RUN chmod +x main.py
# Set data directory as volume mount point
VOLUME /app/data
# Command to update the repo and run the script # 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 pull origin master && python main.py"]

14
docker-compose.yml Normal file
View File

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