Skip to content

Commit

Permalink
Prod: disabled logging, added default DATABASE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
f213 committed Jan 13, 2024
1 parent 1e45089 commit 120223a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ RUN apt-get update \
&& apt-get -y install wget \
&& rm -rf /var/lib/apt/lists/*

ENV BOT_ENV production
ENV DATABASE_URL sqlite:///db/selfmailbot.sqlite
VOLUME /db
RUN pip install --no-cache-dir --upgrade pip
COPY --from=deps-compile /requirements.txt /
RUN pip install --no-cache-dir -r requirements.txt
Expand All @@ -43,7 +46,6 @@ USER nobody
# Bot image
#
FROM base as bot
ENV BOT_ENV production
HEALTHCHECK CMD wget -q -O /dev/null http://localhost:8000/healthcheck || exit 1
CMD python -m src.bot

Expand Down
1 change: 0 additions & 1 deletion src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def healthcheck() -> Response:


async def prod(bot_app: Application) -> None:
enable_logging()
init_sentry()
flask = flask_app_from_bot(bot_app)
url = os.getenv("INCOMING_WEBHOOK_URL")
Expand Down

0 comments on commit 120223a

Please sign in to comment.