forked from poma/docker-telegram-notifier
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
72 lines (65 loc) · 3 KB
/
docker-compose.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: 2
services:
# local docker instance notifier
telegram-notifier-local:
image: soulassassin85/docker-telegram-notifier
container_name: telegram-notifier-local
hostname: telegram-notifier-local
environment:
- TZ=Europe/Kiev
- DOCKER_HOSTNAME=portainer-pve # name or hostname of your docker instance
- DOCKER_IP_ADDRESS=192.168.0.30 # ip address or this local dockere instance
- TELEGRAM_NOTIFIER_BOT_TOKEN= # your bot token @ how to create bot: https://core.telegram.org/bots#3-how-do-i-create-a-bot
- TELEGRAM_NOTIFIER_CHAT_ID= # your chat id @ how to get chat id: https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id/32572159#32572159
# optional args
# ONLY_WHITELIST: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # local docker volume mount, this is not needed for remote instances
# - ./certs:/certs # for remote instance
restart: unless-stopped
# first remote docker instance notifier
telegram-notifier-one:
image: soulassassin85/docker-telegram-notifier
container_name: telegram-notifier-one
hostname: telegram-notifier-one
environment:
- TZ=Europe/Kiev
- DOCKER_HOSTNAME=one # name or hostname of your docker instance
- DOCKER_IP_ADDRESS=192.168.0.19 # ip address or this local dockere instance
- DOCKER_HOST=tcp://192.168.0.19:2375 # ip address and port for remote connection to the docker engine, http/https is detected by port number
# DOCKER_CERT_PATH: /certs # should contain ca.pem, cert.pem, key.pem if you use ssl connections
- TELEGRAM_NOTIFIER_BOT_TOKEN= # your bot token @ how to create bot: https://core.telegram.org/bots#3-how-do-i-create-a-bot
- TELEGRAM_NOTIFIER_CHAT_ID= # your chat id @ how to get chat id: https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id/32572159#32572159
# volumes: # volume for certs of remote instance for secure connection to the docker engine
# - ./certs:/certs # for remote instance
restart: unless-stopped
# second remote docker instance notifier
telegram-notifier-two:
image: soulassassin85/docker-telegram-notifier
container_name: telegram-notifier-two
hostname: telegram-notifier-two
environment:
- TZ=Europe/Kiev
- DOCKER_HOSTNAME=two
- DOCKER_IP_ADDRESS=192.168.0.27
- DOCKER_HOST=tcp://192.168.0.27:2375
- TELEGRAM_NOTIFIER_BOT_TOKEN=
- TELEGRAM_NOTIFIER_CHAT_ID=
restart: unless-stopped
# four ...
# five ...
# six ...
# etc ... :)
#...and ALL notifier instances with the same bot token and your chat id :)
# example-labels-use:
# image: hello-world
# labels:
# telegram-notifier.monitor: true # always monitor
# telegram-notifier.monitor: false # never monitor
# # no label = monitor only when not using whitelist
# # example docker healthcheck
# healthcheck:
# test: curl -sS http://127.0.0.1:8545 || exit 1
# interval: 30s
# timeout: 10s
# retries: 3