Files
mtusi2026lab7/Dockerfile
T

29 lines
1010 B
Docker

FROM minio/mc@sha256:a7fe349ef4bd8521fb8497f55c6042871b2ae640607cf99d9bede5e9bdf11727 AS mc
FROM python:3.11.11-slim
ENV PYTHONPATH=/app \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
APP_HOST=0.0.0.0 \
APP_PORT=8080 \
SESSION_TTL_SECONDS=3600
RUN apt-get update && apt-get install -y --no-install-recommends haproxy openssl && rm -rf /var/lib/apt/lists/*
COPY --from=mc /usr/bin/mc /usr/local/bin/mc
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
ARG APP_REVISION=lab7-v1
ENV APP_REVISION=$APP_REVISION
COPY service.py security_middleware.py /app/
COPY telemetry.py observe.py app.py attachments.py pipeline.py worker.py publisher.py transform.py janitor.py manage.py migrate.py /app/
COPY migrations /app/migrations
COPY scripts /app/scripts
COPY tests /app/tests
COPY contracts /app/contracts
COPY lab.json /app/lab.json
EXPOSE 8080
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
USER 1000:1000