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:
@@ -2,12 +2,15 @@ FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY pyproject.toml .
|
||||
COPY src/ src/
|
||||
RUN pip install --no-cache-dir \
|
||||
"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
|
||||
|
||||
ENTRYPOINT ["bouncer"]
|
||||
ENTRYPOINT ["python", "-m", "bouncer"]
|
||||
CMD ["-c", "/data/bouncer.toml"]
|
||||
|
||||
@@ -6,6 +6,9 @@ services:
|
||||
container_name: bouncer
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
logging:
|
||||
driver: k8s-file
|
||||
volumes:
|
||||
- ./src:/app/src:Z,ro
|
||||
- ./config:/data:Z
|
||||
command: ["-c", "/data/bouncer.toml", "-v"]
|
||||
|
||||
Reference in New Issue
Block a user