Dockerised and prepared with .env
This commit is contained in:
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
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'
|
||||
Reference in New Issue
Block a user