Skip to content

Commit

Permalink
Explicitly set FLASK_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
TheReverend403 committed Feb 23, 2024
1 parent c280777 commit 8ced2cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ COPY poetry.lock pyproject.toml ./
RUN --mount=type=cache,target=/root/.cache \
poetry install --no-root

ENV FLASK_DEBUG=1 \
ENV_FOR_DYNACONF=development \
ENV ENV_FOR_DYNACONF=development \
FLASK_ENV=development \
FLASK_DEBUG=1 \
GUNICORN_OPTS="--reload --reload-extra-file /config" \
# Don't compile assets on startup as built-in autobuild is used in dev/testing environments.
SKIP_ASSETS=true
Expand All @@ -107,6 +108,7 @@ ENV FLASK_DEBUG=1 \
## Production image
FROM flask-base as production

ENV ENV_FOR_DYNACONF=production
ENV ENV_FOR_DYNACONF=production \
FLASK_ENV=production

HEALTHCHECK --start-interval=1s --start-period=10s --interval=10s --timeout=5s CMD ["/docker-healthcheck.sh"]
1 change: 0 additions & 1 deletion pste/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def init_sentry(app):
app.logger.info("Sentry enabled.")
sentry_sdk.init(
dsn=dsn,
environment="production",
release=PSTE_VERSION.replace("pste ", ""),
integrations=[FlaskIntegration(), SqlalchemyIntegration()],
)
Expand Down

0 comments on commit 8ced2cf

Please sign in to comment.