-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1000 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (28 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.14-slim
WORKDIR /app
# ffmpeg for voice message OGG→WAV conversion
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
# Copy project definition and install
COPY pyproject.toml .
COPY src/ src/
RUN pip install --no-cache-dir .
# Non-root user
RUN useradd --create-home --home-dir /app appuser && \
chown -R appuser:appuser /app
USER appuser
# Default env vars (overridden at runtime via -e)
ENV PYTHONUNBUFFERED=1 \
TELEGRAM_BOT_TOKEN="" \
TELEGRAM_ALLOWED_CHAT_IDS="" \
ADMIN_PASSWORD="" \
WEB_SESSION_SECRET="" \
ADMIN_PORT=61301 \
WEB_PORT=59628 \
MODEL_PORT=53658 \
MODEL="gemma4-e2b-q4km" \
DATA_DIR=/app/data \
DEFAULT_TENANT=mikes_plumbing
EXPOSE 61301 59628
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:61301/', timeout=3)" || exit 1
ENTRYPOINT ["plumber-bot"]