Implement Lab 7 security and infrastructure
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
FROM python:3.11.9-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1
|
||||
|
||||
WORKDIR /app
|
||||
RUN groupadd --system app && useradd --system --gid app --home-dir /app app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY app ./app
|
||||
COPY migrations ./migrations
|
||||
COPY scripts ./scripts
|
||||
COPY tests ./tests
|
||||
COPY contracts ./contracts
|
||||
COPY lab.json .
|
||||
COPY alembic.ini .
|
||||
RUN chown -R app:app /app
|
||||
USER app
|
||||
EXPOSE 8443
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8443", "--ssl-keyfile", "/run/tls/api.key", "--ssl-certfile", "/run/tls/api.crt", "--ssl-ca-certs", "/run/tls/lb-ca.crt", "--ssl-cert-reqs", "2", "--timeout-keep-alive", "5", "--timeout-graceful-shutdown", "20"]
|
||||
Reference in New Issue
Block a user