Dockerfile: split dependency download layer

requirements should be copy first to avoid downloading everytime
    excluding example config from docker

Signed-off-by: apentori <pentori.alexis@proton.me>
This commit is contained in:
apentori
2026-05-11 15:55:39 +02:00
parent a665fb7d46
commit 4d5df2e8ab
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -9,3 +9,6 @@ __pycache__/
# Status Bot
uploads/
bot/docs
config.yaml
.env
+4 -1
View File
@@ -1,10 +1,13 @@
FROM python:3.12-slim
WORKDIR /app
COPY . .
COPY requirements.txt .
COPY bot/requirements.txt bot/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt \
&& if [ -f bot/requirements.txt ]; then pip install --no-cache-dir -r bot/requirements.txt; fi
COPY . .
ENTRYPOINT ["python", "monitor.py"]
CMD []