Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Comment on lines +109 to +121

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 prod AS prod-with-sentry
RUN --mount=type=cache,target=/root/.cache \
pip install sentry_sdk[flask]



FROM app-${DEPS} AS prod

ENV FLASK_APP=app.app:create_app
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@
"migrations = app.migrations:versions",
],
},
extras_require={
"sentry": ["sentry_sdk[flask]"],
},
)