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 <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,7 @@ FROM python:3.13-alpine
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY pyproject.toml .
|
RUN pip install --no-cache-dir maxminddb>=2.0
|
||||||
COPY src/ src/
|
|
||||||
|
|
||||||
RUN pip install --no-cache-dir .
|
ENV PYTHONPATH=/app/src
|
||||||
|
ENTRYPOINT ["python", "-m", "derp"]
|
||||||
ENTRYPOINT ["derp"]
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ services:
|
|||||||
container_name: derp
|
container_name: derp
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/derp.toml:/app/config/derp.toml:ro,Z
|
- ./src:/app/src:ro,Z
|
||||||
- ./plugins:/app/plugins:ro,Z
|
- ./plugins:/app/plugins:ro,Z
|
||||||
|
- ./config/derp.toml:/app/config/derp.toml:ro,Z
|
||||||
command: ["--verbose"]
|
command: ["--verbose"]
|
||||||
|
|||||||
Reference in New Issue
Block a user