- Dockerfile: EXPOSE 8080 → 8081 + HEALTHCHECK auf /api/stats - docker-compose.yml: healthcheck + json-file logging (10MB/3 Dateien) - conf/config.yaml: Version 0.7.0, Host/Port aktualisiert Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
439 B
Docker
20 lines
439 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application
|
|
COPY meshbot/ meshbot/
|
|
COPY static/ static/
|
|
COPY main.py .
|
|
|
|
EXPOSE 8081
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8081/api/stats')" || exit 1
|
|
|
|
CMD ["python", "main.py"]
|