Files
mtusi2026lab2/Dockerfile
T

11 lines
373 B
Docker

FROM python:3.12.12-slim
WORKDIR /srv
COPY requirements.lock .
RUN pip install --no-cache-dir --timeout 120 --retries 5 -r requirements.lock
COPY app app
COPY migrations migrations
RUN useradd --uid 10001 --create-home api
USER api
EXPOSE 8080
CMD ["sh", "-c", "python -m app.migrate && exec gunicorn --bind 0.0.0.0:8080 --workers 2 --threads 4 --timeout 15 app.main:app"]