Выполнение лабораторной работы номер 7
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
FROM python:3.11.9-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app.py schemas.py db.py cache.py migrate.py attachments.py cleanup.py pipeline.py worker.py telemetry.py tls_proxy.py api_start.py secret_entry.py ./
|
||||
COPY migrations ./migrations
|
||||
|
||||
# непривилегированный пользователь
|
||||
RUN useradd --create-home --shell /bin/bash appuser
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=3s --timeout=3s --start-period=10s --retries=3 \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health/ready').read()" || exit 1
|
||||
|
||||
# exec: uvicorn — PID 1, получает SIGTERM и корректно закрывает пул соединений
|
||||
ENTRYPOINT ["python", "secret_entry.py"]
|
||||
CMD ["python", "api_start.py"]
|
||||
Reference in New Issue
Block a user