File size: 430 Bytes
6ab520d 459b8f5 6ab520d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
FROM python:3.8.13 AS base
ENV PYTHONPATH=$PYTHONPATH:/src/
COPY ./requirements.txt /src/requirements.txt
WORKDIR /src
RUN pip install --upgrade pip && pip install -r requirements.txt
# π Uncomment for DEPLOY / Comment for DevContainers
COPY ./ /src/
FROM base AS test
RUN ["python", "-m", "pytest", "-v", "/src/tests"]
FROM base AS build
CMD gunicorn -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:5000 main:app |