fix: mount source via volume instead of baking into image
Containerfile now only installs dependencies; source code and config are mounted at runtime via compose volumes. Adds k8s-file log driver and PYTHONUNBUFFERED for reliable container logging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-4
@@ -2,12 +2,15 @@ FROM python:3.12-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY pyproject.toml .
|
RUN pip install --no-cache-dir \
|
||||||
COPY src/ src/
|
"python-socks[asyncio]>=2.4" \
|
||||||
|
"aiosqlite>=0.19"
|
||||||
|
|
||||||
RUN pip install --no-cache-dir .
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
ENV PYTHONPATH=/app/src
|
||||||
|
|
||||||
|
VOLUME /app/src
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
ENTRYPOINT ["bouncer"]
|
ENTRYPOINT ["python", "-m", "bouncer"]
|
||||||
CMD ["-c", "/data/bouncer.toml"]
|
CMD ["-c", "/data/bouncer.toml"]
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ services:
|
|||||||
container_name: bouncer
|
container_name: bouncer
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
logging:
|
||||||
|
driver: k8s-file
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./src:/app/src:Z,ro
|
||||||
- ./config:/data:Z
|
- ./config:/data:Z
|
||||||
command: ["-c", "/data/bouncer.toml", "-v"]
|
command: ["-c", "/data/bouncer.toml", "-v"]
|
||||||
|
|||||||
Reference in New Issue
Block a user