<reponame>road-master/showroom-event-scheduler
FROM python:3.9.6-slim-buster as production
WORKDIR /workspace
COPY ./Pipfile ./Pipfile.lock /workspace/
RUN pip --no-cache-dir install pipenv \
 && pipenv install --deploy --system \
 && pip uninstall -y pipenv virtualenv-clone virtualenv
COPY . /workspace
ENTRYPOINT [ "python3", "run_showroom_event_scheduler.py" ]

FROM production as development
# see: https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
ENV PIPENV_VENV_IN_PROJECT=1
RUN pip --no-cache-dir install pipenv \
 && pipenv install --deploy --dev
ENTRYPOINT [ "pipenv", "run" ]
CMD ["pytest"]
