diff --git a/README.md b/README.md index 78f3ff5..b8b2fd2 100755 --- a/README.md +++ b/README.md @@ -16,3 +16,46 @@ Testing markiert die Container als Testinstanz oder in der Produktivumgebung lau Wann immer möglich, sollen healthchecks eingebaut werden, dann kann ein Altering auf kritische Komponenten stattfinden. +## Server +### Produktion +192.168.178.183 / pve-docker-apps.fritz.box +### Testing +192.168.178.241 / pve-docker-test.fritz.box + +## Compose-Dateien auf Heimserver + +Speichert die gerade bearbeitete Compose-Datei auf dem Heimserver +### Service-Konfiguration +``` +sven@pve-docker-apps:~$ sudo systemctl status compose-watch.service +● compose-watch.service - Compose Watch Script + Loaded: loaded (/etc/systemd/system/compose-watch.service; enabled; preset: enabled) + Active: active (running) since Mon 2025-12-22 07:43:43 CET; 15s ago + Main PID: 3230729 (bash) + Tasks: 3 (limit: 36036) + Memory: 764.0K + CPU: 5ms + CGroup: /system.slice/compose-watch.service + ├─3230729 /bin/bash /home/sven/compose-watch.sh + ├─3230731 inotifywait -m -e modify --format %w%f /opt/code-server/compose.yaml /opt/do> + └─3230732 /bin/bash /home/sven/compose-watch.sh + +Dez 22 07:43:43 pve-docker-apps systemd[1]: Started compose-watch.service - Compose Watch Script. +Dez 22 07:43:43 pve-docker-apps bash[3230731]: Setting up watches. +Dez 22 07:43:43 pve-docker-apps bash[3230731]: Watches established. +``` + +### Script-Inhalt + + +``` +inotifywait -m -e modify --format '%w%f' /opt/*/*.{yaml,yml} | while read file; do + filename=$(basename "$file") + path=$(dirname "$file") + curl -X POST http://192.168.178.183:9789/webhook/4f21c869-65de-4566-9941-f6f31543444e \ + -F "file=@${file}" \ + -F "filename=${filename}" \ + -F "path=${path}" +done +``` +