27 lines
961 B
YAML
27 lines
961 B
YAML
---
|
|
version: "3.8"
|
|
|
|
# Telegram notifications. Two mutually exclusive modes:
|
|
#
|
|
# Own-bot mode: set TELEGRAM_ENABLED=true and insert none of the secrets below. Each user connects their personal bot with their own token and chat ID.
|
|
#
|
|
# Shared-bot mode: one bot serves every user on the instance. Inserting the telegram_bot_token secret enables it on its own, and then TELEGRAM_BOT_USERNAME and telegram_webhook_secret are both required or the app refuses to boot. Create the bot with @BotFather.
|
|
|
|
services:
|
|
app:
|
|
environment:
|
|
- TELEGRAM_ENABLED
|
|
# Without the leading @
|
|
- TELEGRAM_BOT_USERNAME
|
|
secrets:
|
|
- telegram_bot_token
|
|
- telegram_webhook_secret
|
|
|
|
secrets:
|
|
telegram_bot_token:
|
|
external: true
|
|
name: ${STACK_NAME}_telegram_bot_token_${SECRET_TELEGRAM_BOT_TOKEN_VERSION:-v1}
|
|
telegram_webhook_secret:
|
|
external: true
|
|
name: ${STACK_NAME}_telegram_webhook_secret_${SECRET_TELEGRAM_WEBHOOK_SECRET_VERSION:-v1}
|