This commit is contained in:
Mateusz Gruszczyński
2026-07-13 13:27:56 +02:00
parent bd562b3da6
commit bfbc29effe
3 changed files with 38 additions and 14 deletions
+13 -3
View File
@@ -1,11 +1,21 @@
FROM python:3.14-alpine
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /data
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD sh -c 'curl -f http://localhost:${APP_PORT:-8000}/health || exit 1'
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD sh -c 'curl -f http://localhost:${APP_PORT:-8000}/health || exit 1'
CMD ["sh", "-c", "gunicorn --worker-class gthread --workers ${GUNICORN_WORKERS:-1} --threads ${GUNICORN_THREADS:-8} --timeout ${GUNICORN_TIMEOUT:-0} --bind 0.0.0.0:${APP_PORT:-8000} wsgi:app"]