This commit is contained in:
2026-11-06 20:40:12 +03:00
parent 65003b6119
commit 7329d94740
31 changed files with 1662 additions and 4 deletions
+24
View File
@@ -0,0 +1,24 @@
FROM python:3.12.8-slim-bookworm
RUN useradd --create-home --uid 10001 --shell /usr/sbin/nologin appuser \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY src/app /app/app
COPY migrations /app/migrations
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app
USER appuser
EXPOSE 8080
HEALTHCHECK --interval=5s --timeout=3s --start-period=15s --retries=12 \
CMD curl -fsS http://127.0.0.1:8080/health/ready || exit 1
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]