Skip to content

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

Open
VincentCauchois wants to merge 2 commits into
developfrom
feat/add-sentry-sdk-flask-library
Open

feat(sentry): add stage with sentry_sdk[flask] to dockerfile#219
VincentCauchois wants to merge 2 commits into
developfrom
feat/add-sentry-sdk-flask-library

Conversation

@VincentCauchois

Copy link
Copy Markdown
Member

No description provided.

@VincentCauchois VincentCauchois added enhancement dependencies Pull requests that update a dependency file labels May 27, 2024
@VincentCauchois VincentCauchois self-assigned this May 27, 2024
Allow to use the command `pip install -e .['sentry']` to add the `sentry-sdk` library for Flask.
@VincentCauchois
VincentCauchois force-pushed the feat/add-sentry-sdk-flask-library branch from ecea291 to 097daaa Compare May 29, 2024 14:31
@jacquesfize

Copy link
Copy Markdown
Contributor

C'est pas suffisant pour activer sentry ?

Comment thread Dockerfile
Comment on lines +109 to +121
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"]

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]

@jacquesfize

Copy link
Copy Markdown
Contributor

@VincentCauchois toujours un besoin ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants