Skip to content

Commit

Permalink
Add WEBHOOK_URL to .env.example
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivansh-007 committed Jun 3, 2021
1 parent 600f424 commit a9b2a9d
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ CONNECTION_URI="mongodb+srv://mongodburi"
CLIENT_ID = "YOUR APP'S CLIENT ID HERE"
CLIENT_SECRET = "YOUR APP'S CLIENT SECRET HERE"
REDIRECT_URI = "https://yourdomain.com/callback"

# OLLI
WEBHOOK_URL = "YOUR WEBHOOK URL HERE"
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-
# Copy using poetry.lock* in case it doesn't exist yet
COPY ./pyproject.toml ./poetry.lock* /app/

# Copy olli config to a known place
COPY ./olli.toml /config/

RUN poetry install --no-root --no-dev

COPY . /app
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ services:
- staticfiles:/var/www/static
environment:
- APP_MODULE=website.main:app
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-external-labels: job=site

bot:
<< : *restart_policy
Expand All @@ -65,6 +70,11 @@ services:
tty: true
depends_on:
- web
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-external-labels: job=bot

volumes:
staticfiles:
1 change: 0 additions & 1 deletion modmail/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ def ensure_exception(fut: asyncio.Future) -> None:
async def on_ready(self) -> None:
"""Send basic login success message."""
log.info("Logged in as %s", self.user)
log.error("test")
23 changes: 23 additions & 0 deletions olli.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[olli]
interval_minutes = 5

[loki]
api_url = "http://loki:3100/"
jobs = [
"bot", "site"
]

[discord]
WEBHOOK_URL = "https://discord.com/api/webhooks/849632109304086579/-e5kUMlLW9aLhuxUbTIimy3bqClD4Uy3662WlEkjyZ1It7cgwU30x_7YWDxc-nJhpn1W"

[[olli.tokens]]
token = "ERROR"
color = "#ff5f5f"

[[olli.tokens]]
token = "WARN"
color = "#ffe24d"
case_sensitive = true

[[olli.tokens]]
token = "INFO"

0 comments on commit a9b2a9d

Please sign in to comment.