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:
|
services:
|
||||||
roborock-server:
|
roborock-server:
|
||||||
image: ghcr.io/python-roborock/local_roborock_server:latest
|
image: ghcr.io/python-roborock/local_roborock_server:latest
|
||||||
container_name: roborock_local_server
|
container_name: roborock_server
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
# Verwende host-Netzwerk für einfaches MDNS/Discovery (empfohlen)
|
||||||
|
network_mode: host
|
||||||
environment:
|
environment:
|
||||||
- ROBOROCK_FQDN=${ROBOROCK_FQDN:-roborock.local}
|
# Allgemeine Einstellungen mit Fallbacks
|
||||||
- ROBOROCK_REGION=${ROBOROCK_REGION:-de}
|
- REGION=${ROBOROCK_REGION:-de}
|
||||||
- ROBOROCK_ADMIN_PASSWORD=${ROBOROCK_ADMIN_PASSWORD:-SicheresPasswort123!}
|
- TIMEZONE=${ROBOROCK_TIMEZONE:-Europe/Berlin}
|
||||||
- ROBOROCK_SERVER_HEALTHCHECK_SCHEME=http
|
|
||||||
ports:
|
# Reverse Proxy Modus (Wichtig für externe Zertifikate)
|
||||||
- "${ROBOROCK_PROXY_PORT:-8080}:8080"
|
- LISTENER_MODE=${ROBOROCK_LISTENER_MODE:-external}
|
||||||
- "${ROBOROCK_MQTT_PORT:-1883}:1883"
|
|
||||||
- "${ROBOROCK_MQTT_TLS_PORT:-8883}:8883"
|
# Intern genutzte Ports des Containers
|
||||||
|
- API_PORT=${ROBOROCK_INTERNAL_API_PORT:-8888}
|
||||||
|
- MQTT_PORT=${ROBOROCK_INTERNAL_MQTT_PORT:-8883}
|
||||||
volumes:
|
volumes:
|
||||||
# Wird von Portainer aus dem Git geklont und steht sofort bereit
|
- roborock_data:/data
|
||||||
- ./config.toml.template:/app/config.toml.template:ro
|
|
||||||
# Pfad zur DB. Damit Portainer keinen Ordner erstellt, legen wir die Datei im Command an:
|
# Voll parametrisierter Healthcheck
|
||||||
- ${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"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
test: [
|
||||||
interval: 30s
|
"CMD",
|
||||||
timeout: 10s
|
"curl",
|
||||||
retries: 3
|
"-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