updating configuration
This commit is contained in:
+76
-2
@@ -7,6 +7,17 @@ services:
|
||||
environment:
|
||||
- SUBDOMAIN="home-fnv"
|
||||
restart: always
|
||||
healthcheck:
|
||||
# нет HTTP-порта, сервис — вечный цикл run.sh с sleep 5m между обновлениями
|
||||
test: ["CMD-SHELL", "pgrep -f run.sh || exit 1"]
|
||||
interval: 1m
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
mosquitto:
|
||||
build: ./mosquitto/docker
|
||||
@@ -15,10 +26,16 @@ services:
|
||||
ports:
|
||||
- "1883:1883"
|
||||
restart: always
|
||||
healthcheck:
|
||||
# auth включена (MQTT_USERNAME/PASSWORD из env_file), проверяем publish под теми же кредами
|
||||
test: ["CMD-SHELL", "mosquitto_pub -h localhost -t healthcheck -m ping -u \"$$MQTT_USERNAME\" -P \"$$MQTT_PASSWORD\" -q 0"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 50m
|
||||
max-size: 50m
|
||||
|
||||
postgres:
|
||||
image: postgres:16.1
|
||||
@@ -26,10 +43,15 @@ services:
|
||||
volumes:
|
||||
- ./postgres/settings/data:/var/lib/postgresql/data
|
||||
env_file: ./postgres/settings/postgres.env
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 50m
|
||||
max-size: 50m
|
||||
|
||||
hass:
|
||||
image: "homeassistant/home-assistant:stable" #2026.4.2
|
||||
@@ -76,6 +98,12 @@ services:
|
||||
restart: always
|
||||
links:
|
||||
- "hass"
|
||||
healthcheck:
|
||||
# http: (dashboard) не включён в appdaemon.yaml -> HTTP-порта нет, проверяем процесс
|
||||
test: ["CMD-SHELL", "pgrep -f 'appdaemon' || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
@@ -95,6 +123,16 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./node-red/settings/data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:1880/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
esphome:
|
||||
image: esphome/esphome:latest #2025.6 #esphome-armv7
|
||||
@@ -107,6 +145,11 @@ services:
|
||||
#devices:
|
||||
# - "/dev/ttyUSB0:/dev/ttyUSB0"
|
||||
#network_mode: host
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:6052/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
@@ -161,6 +204,13 @@ services:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
restart: always
|
||||
healthcheck:
|
||||
# без -f: бэкенд (hass) может честно вернуть не-2xx (напр. untrusted proxy),
|
||||
# нас интересует только что nginx сам жив и отвечает на TCP/HTTP
|
||||
test: ["CMD-SHELL", "curl -s -o /dev/null http://localhost/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
@@ -181,6 +231,13 @@ services:
|
||||
- "8081:80"
|
||||
#entrypoint: certbot
|
||||
#command: certonly --standalone --agree-tos --non-interactive --email admin@yandex5.ru -d gitea.yandex5.ru
|
||||
healthcheck:
|
||||
# standalone-сервер поднимается только на момент renew раз в сутки,
|
||||
# 8081 в остальное время не слушает -> проверяем сам цикл update_certs.sh
|
||||
test: ["CMD-SHELL", "pgrep -f update_certs.sh || exit 1"]
|
||||
interval: 1m
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
@@ -217,6 +274,12 @@ services:
|
||||
- ./secrets/hass-fnv/settings/secrets.yaml:/config/secrets.yaml:ro
|
||||
env_file: ./matter-bridge/settings/matter-bridge.env
|
||||
network_mode: host
|
||||
healthcheck:
|
||||
# в образе нет curl/wget, только nc — TCP-проверка порта веб-UI
|
||||
test: ["CMD-SHELL", "nc -z -w2 localhost 8482 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
@@ -232,3 +295,14 @@ services:
|
||||
ports:
|
||||
- "8001:8000"
|
||||
env_file: ./keenetic/settings/keenetic.env
|
||||
healthcheck:
|
||||
# в образе только python3 (нет curl/wget), используем встроенный /health FastAPI-роут
|
||||
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=5)"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
Reference in New Issue
Block a user