Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sentry): add stage with sentry_sdk[flask] to dockerfile #219

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
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"]


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]"],
},
)
Loading