diff --git a/Dockerfile b/Dockerfile index 38313f1..77c861f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,26 @@ FROM python:3.9.12-bullseye # Basic config -ARG DAILY_TASKS=True -ARG DAILY_RELEASES=True -ARG DAILY_TASKS_UTC_HOUR=12 +ARG daily_tasks=true +ARG daily_releases=true +ARG daily_tasks_utc_hour=12 # Secret config -ARG BOT_TOKEN -ARG DAILY_CHANNEL_ID -ARG GRAVATAR_EMAIL -ARG IGDB_CLIENT_ID -ARG IGDB_CLIENT_SECRET +ARG bot_token +ARG daily_channel_id +ARG gravatar_email +ARG igdb_client_id +ARG igdb_client_secret # Environment variables -ENV DAILY_TASKS=$DAILY_TASKS -ENV DAILY_RELEASES=$DAILY_RELEASES -ENV DAILY_CHANNEL_ID=$DAILY_CHANNEL_ID -ENV DAILY_TASKS_UTC_HOUR=$DAILY_TASKS_UTC_HOUR -ENV BOT_TOKEN=$BOT_TOKEN -ENV GRAVATAR_EMAIL=$GRAVATAR_EMAIL -ENV IGDB_CLIENT_ID=$IGDB_CLIENT_ID -ENV IGDB_CLIENT_SECRET=$IGDB_CLIENT_SECRET +ENV daily_tasks=$DAILY_TASKS +ENV daily_releases=$DAILY_RELEASES +ENV daily_channel_id=$DAILY_CHANNEL_ID +ENV daily_tasks_utc_hour=$DAILY_TASKS_UTC_HOUR +ENV bot_token=$BOT_TOKEN +ENV gravatar_email=$GRAVATAR_EMAIL +ENV igdb_client_id=$IGDB_CLIENT_ID +ENV igdb_client_secret=$IGDB_CLIENT_SECRET COPY requirements.txt . COPY *.py . diff --git a/discord_bot.py b/discord_bot.py index c96bd87..cc75828 100644 --- a/discord_bot.py +++ b/discord_bot.py @@ -174,7 +174,7 @@ async def on_ready(): except KeyError: daily_task.start() else: - if os.environ['daily_tasks'] == 'true': + if os.environ['daily_tasks'].lower() == 'true': daily_task.start() else: print("'daily_tasks' environment variable is disabled") @@ -379,7 +379,7 @@ async def daily_task(): except KeyError: daily_releases = True else: - if os.environ['daily_tasks'] == 'true': + if os.environ['daily_tasks'].lower() == 'true': daily_releases = True else: print("'daily_releases' environment variable is disabled")