14 lines
440 B
Docker
14 lines
440 B
Docker
FROM python:3.13-slim
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
RUN useradd -m appuser && mkdir -p /app/uploads && chown -R appuser:appuser /app
|
|
USER appuser
|
|
|
|
EXPOSE 5000
|
|
HEALTHCHECK --interval=30s --timeout=5s CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/healthz')" || exit 1
|
|
CMD ["waitress-serve", "--host=0.0.0.0", "--port=5000", "app:app"]
|