Skip to content

Commit

Permalink
feat(sentry): add stage with sentry_sdk[flask] to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentCauchois committed May 27, 2024
1 parent cd3ad11 commit 3bea92c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ RUN --mount=type=cache,target=/root/.cache \
pip install *.whl


FROM app-${DEPS} AS prod-with-sentry

RUN --mount=type=cache,target=/root/.cache \
pip install sentry_sdk[flask]

ENV FLASK_APP=app.app:create_app
ENV PYTHONPATH=/dist/config/
ENV USERSHUB_SETTINGS=config.py
ENV USERSHUB_STATIC_FOLDER=/dist/static

EXPOSE 5001

CMD ["gunicorn", "app.app:create_app()", "--bind=0.0.0.0:5001", "--access-logfile=-", "--error-logfile=-", "--reload", "--reload-extra-file=config/config.py"]


FROM app-${DEPS} AS prod

ENV FLASK_APP=app.app:create_app
Expand Down

0 comments on commit 3bea92c

Please sign in to comment.