36 lines
720 B
YAML
36 lines
720 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
thinkcenter-monitor:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: thinkcenter-monitor
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
TARGET_URL: ${TARGET_URL}
|
|
HA_URL: ${HA_URL}
|
|
HA_TOKEN: ${HA_TOKEN}
|
|
HA_ENTITY: ${HA_ENTITY}
|
|
GRACE_PERIOD: ${GRACE_PERIOD}
|
|
CHECK_INTERVAL: ${CHECK_INTERVAL}
|
|
LOG_FILE: /var/log/thinkcenter_monitor.log
|
|
|
|
volumes:
|
|
- ./logs:/var/log
|
|
|
|
# Resource limits
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.1'
|
|
memory: 64M
|
|
|
|
# JSON file logging
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: '3'
|
|
max-size: '10m'
|