forked from mtusi2026/mtusi2026lab2
13 lines
572 B
Docker
13 lines
572 B
Docker
FROM python:3.13.12-slim-bookworm@sha256:a58daefb915e1e03ad48f3ca4df8832065412c5c35cacb9d39f4229184de12b6
|
|
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 APP_HOST=0.0.0.0 APP_PORT=8080
|
|
WORKDIR /app
|
|
COPY requirements.txt /app/
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY --chown=10001:10001 src/ /app/src/
|
|
COPY --chown=10001:10001 migrations/ /app/migrations/
|
|
USER 10001:10001
|
|
EXPOSE 8080
|
|
STOPSIGNAL SIGTERM
|
|
HEALTHCHECK --interval=5s --timeout=4s --start-period=10s --retries=3 CMD ["python", "src/app.py", "--healthcheck"]
|
|
ENTRYPOINT ["python", "src/app.py"]
|