roborock/docker-compose.yml aktualisiert
This commit is contained in:
1 parent
a4b78ad97a
commit
d98fc09ae0
1 file changed
+30
-20
+30
-20
@@ -1,27 +1,37 @@
|
||||
services:
|
||||
roborock-server:
|
||||
image: ghcr.io/python-roborock/local_roborock_server:latest
|
||||
container_name: roborock_local_server
|
||||
container_name: roborock_server
|
||||
restart: unless-stopped
|
||||
# Verwende host-Netzwerk für einfaches MDNS/Discovery (empfohlen)
|
||||
network_mode: host
|
||||
environment:
|
||||
- ROBOROCK_FQDN=${ROBOROCK_FQDN:-roborock.local}
|
||||
- ROBOROCK_REGION=${ROBOROCK_REGION:-de}
|
||||
- ROBOROCK_ADMIN_PASSWORD=${ROBOROCK_ADMIN_PASSWORD:-SicheresPasswort123!}
|
||||
- ROBOROCK_SERVER_HEALTHCHECK_SCHEME=http
|
||||
ports:
|
||||
- "${ROBOROCK_PROXY_PORT:-8080}:8080"
|
||||
- "${ROBOROCK_MQTT_PORT:-1883}:1883"
|
||||
- "${ROBOROCK_MQTT_TLS_PORT:-8883}:8883"
|
||||
# Allgemeine Einstellungen mit Fallbacks
|
||||
- REGION=${ROBOROCK_REGION:-de}
|
||||
- TIMEZONE=${ROBOROCK_TIMEZONE:-Europe/Berlin}
|
||||
|
||||
# Reverse Proxy Modus (Wichtig für externe Zertifikate)
|
||||
- LISTENER_MODE=${ROBOROCK_LISTENER_MODE:-external}
|
||||
|
||||
# Intern genutzte Ports des Containers
|
||||
- API_PORT=${ROBOROCK_INTERNAL_API_PORT:-8888}
|
||||
- MQTT_PORT=${ROBOROCK_INTERNAL_MQTT_PORT:-8883}
|
||||
volumes:
|
||||
# Wird von Portainer aus dem Git geklont und steht sofort bereit
|
||||
- ./config.toml.template:/app/config.toml.template:ro
|
||||
# Pfad zur DB. Damit Portainer keinen Ordner erstellt, legen wir die Datei im Command an:
|
||||
- ${ROBOROCK_DB_FILE:-./roborock.db}:/data/roborock.db
|
||||
# Erweitertes Skript: 1. Erstellt eine leere DB-Datei falls nicht existent -> 2. Befüllt die config.toml -> 3. Startet die App
|
||||
command: >
|
||||
bash -c "touch /data/roborock.db && python3 -c \"import os, string; t = string.Template(open('/app/config.toml.template').read()); open('/app/config.toml', 'w').write(t.substitute(os.environ))\" && exec python3 -m local_roborock_server"
|
||||
- roborock_data:/data
|
||||
|
||||
# Voll parametrisierter Healthcheck
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
test: [
|
||||
"CMD",
|
||||
"curl",
|
||||
"-skf",
|
||||
"${ROBOROCK_SERVER_HEALTHCHECK_SCHEME:-http}://127.0.0.1:${ROBOROCK_INTERNAL_API_PORT:-8888}/admin"
|
||||
]
|
||||
interval: ${ROBOROCK_HEALTHCHECK_INTERVAL:-30s}
|
||||
timeout: ${ROBOROCK_HEALTHCHECK_TIMEOUT:-5s}
|
||||
retries: ${ROBOROCK_HEALTHCHECK_RETRIES:-5}
|
||||
start_period: ${ROBOROCK_HEALTHCHECK_START_PERIOD:-20s}
|
||||
|
||||
volumes:
|
||||
roborock_data:
|
||||
name: ${ROBOROCK_VOLUME_NAME:-roborock_data}
|
||||
Reference in new issue
Block a user