Skip to content

Commit

Permalink
Set Events API URL as an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorntonMatthewD committed Dec 11, 2023
1 parent c812b66 commit 4734218
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export DATABASE_PATH="./slack-events-bot.db"
export PORT="3000"
export SIGNING_SECRET="signing_secret_here"
export TZ="US/Eastern"
export EVENTS_API_URL="https://stage.hackgreenville.com/api/v0/events"
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- SIGNING_SECRET=signing_secret_here
- PORT=3000
- TZ=US/Eastern
- EVENTS_API_URL=https://stage.hackgreenville.com/api/v0/events
volumes:
- ./slack-events-bot.db:/usr/src/app/slack-events-bot.db
ports:
Expand Down
2 changes: 1 addition & 1 deletion src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async def check_api():
"""Check the api for updates and update any existing messages"""
async with aiohttp.ClientSession() as session:
async with session.get(
"https://stage.hackgreenville.com/api/v0/events"
os.environ.get("EVENTS_API_URL") or "https://events.openupstate.org/api/gtc"
) as resp:
# get timezone aware today
today = datetime.date.today()
Expand Down

0 comments on commit 4734218

Please sign in to comment.