-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.multi-destination.yml
More file actions
52 lines (48 loc) · 2 KB
/
Copy pathdocker-compose.multi-destination.yml
File metadata and controls
52 lines (48 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# ─────────────────────────────────────────────────────────────
# Multi-destination — deliver each backup to several Telegram chats
# TELEGRAM_CHAT_ID accepts a comma-separated list; the backup is uploaded
# once and fanned out to every chat (file_id reuse ≤ 50 MB, a single MTProto
# upload reused for larger files). TELEGRAM_THREAD_ID is honoured only when a
# single chat is configured. · See examples/README.md and docs/CONFIGURATION.md
# ─────────────────────────────────────────────────────────────
services:
postgres:
image: postgres:17
environment:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U myuser"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
backup:
image: ganiyevuz/backupgram:17
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
SCHEDULE: "@daily"
TELEGRAM_BOT_TOKEN: "${TELEGRAM_BOT_TOKEN}"
# Fan out to an ops channel + a personal chat (the bot must be a member of each).
TELEGRAM_CHAT_ID: "-1001234567890,123456789"
# Large backups fan out too (uploaded once, sent to all) — the image ships a
# shared default app, so these are optional. Set your own for independence:
# TELEGRAM_API_ID: "${TELEGRAM_API_ID}"
# TELEGRAM_API_HASH: "${TELEGRAM_API_HASH}"
TELEGRAM_UPLOAD_METHOD: "smart" # smart | botapi | mtproto
PROJECT_NAME: "Production Database"
volumes:
- backups:/backups
restart: unless-stopped
volumes:
pgdata:
backups: