-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
28 lines (27 loc) · 845 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
28 lines (27 loc) · 845 Bytes
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
version: '3.8'
services:
resource-monitor:
build: .
container_name: resource-monitor
restart: unless-stopped
# Required for accurate system metrics
privileged: true
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
environment:
- TZ=${TZ:-UTC}
# Telegram configuration
# Leave TELEGRAM_TOKEN empty for console mode
- TELEGRAM_TOKEN=${TELEGRAM_TOKEN:-}
- CHAT_ID=${CHAT_ID:-}
- INTERVAL_MINUTES=${INTERVAL_MINUTES:-5}
# Command line arguments for the application
command: >
dotnet ResourceMonitorCli.dll ${TELEGRAM_TOKEN:+--telegram ${TELEGRAM_TOKEN}} ${TELEGRAM_TOKEN:+--chat ${CHAT_ID}} ${TELEGRAM_TOKEN:+--interval ${INTERVAL_MINUTES}}
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M