Перенести и адаптировать обязательный минимум лабораторной 6
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
FROM python:3.11.10-slim-bookworm@sha256:840e180ebcc6e5c8efab209c43f5e40fd2af98cb49db5c7103c90539c56bb30e
|
||||
WORKDIR /app
|
||||
# Приложение работает без прав root.
|
||||
RUN groupadd -r appuser && useradd -r -g appuser appuser
|
||||
COPY requirements.lock.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.lock.txt
|
||||
COPY src/ src/
|
||||
COPY migrations/ migrations/
|
||||
USER appuser
|
||||
HEALTHCHECK --interval=2s --timeout=2s --start-period=10s --retries=3 CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health/ready',timeout=1)"
|
||||
EXPOSE 8080
|
||||
CMD ["python", "-m", "src.serve"]
|
||||
Reference in New Issue
Block a user