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 #500

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
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,23 @@ COPY /requirements.txt .
RUN --mount=type=cache,target=/root/.cache \
pip install -r requirements.txt

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

COPY --from=build-taxhub /build/dist/*.whl .
RUN --mount=type=cache,target=/root/.cache \
pip install *.whl
RUN --mount=type=cache,target=/root/.cache \
pip install sentry_sdk[flask]

ENV FLASK_APP=apptax.app:create_app
ENV PYTHONPATH=/dist/config/
ENV TAXHUB_SETTINGS=config.py
ENV TAXHUB_STATIC_FOLDER=/dist/static

EXPOSE 5000

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


FROM app-${DEPS} AS prod

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"pytest-cov",
"schema",
],
"sentry": ["sentry_sdk[flask]"],
},
)
Loading