Updated dockerfile
This commit is contained in:
parent
51496646f4
commit
2a52d31295
@ -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
14
docker-compose.yml
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user