From ee68e771570ae98403dd06b76a485221e9053437 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 15 Feb 2026 03:49:09 +0100 Subject: [PATCH] refactor: mount source and plugins instead of baking into image Containerfile now installs only dependencies (maxminddb). Source code, plugins, and config are volume-mounted via docker-compose. Code changes no longer require an image rebuild. Co-Authored-By: Claude Opus 4.6 --- Containerfile | 8 +++----- docker-compose.yml | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Containerfile b/Containerfile index ce7f44e..f2a60d0 100644 --- a/Containerfile +++ b/Containerfile @@ -2,9 +2,7 @@ FROM python:3.13-alpine WORKDIR /app -COPY pyproject.toml . -COPY src/ src/ +RUN pip install --no-cache-dir maxminddb>=2.0 -RUN pip install --no-cache-dir . - -ENTRYPOINT ["derp"] +ENV PYTHONPATH=/app/src +ENTRYPOINT ["python", "-m", "derp"] diff --git a/docker-compose.yml b/docker-compose.yml index 85efcf6..eead387 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,7 @@ services: container_name: derp restart: unless-stopped volumes: - - ./config/derp.toml:/app/config/derp.toml:ro,Z + - ./src:/app/src:ro,Z - ./plugins:/app/plugins:ro,Z + - ./config/derp.toml:/app/config/derp.toml:ro,Z command: ["--verbose"]