Stackwatch : suivi des mises à jour de stacks docker compose via SSH
Base Up And Down (auth, thème, dialogues) + moteur fleet (script distant POSIX, analyse pull + comparaison d'images, mise à jour d'une stack), interface de suivi. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
56e1bbe842
54 files changed
+10954
No files matched your search
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
d=$(basename "$PWD")
|
||||
case "$1 $2" in
|
||||
"version -f") echo 27.0.0; exit 0 ;;
|
||||
"compose version") if [ "$3" = "--short" ]; then echo 2.29.0; else echo "Docker Compose version v2.29.0"; fi; exit 0 ;;
|
||||
"compose config")
|
||||
[ "$d" = empty ] && { echo "empty compose file" >&2; exit 1; }
|
||||
[ "$d" = broken ] && { echo "yaml: line 3: mapping values are not allowed" >&2; exit 1; }
|
||||
exit 0 ;;
|
||||
"compose ps") [ "$d" = stopped ] && exit 0; echo c1; [ "$d" = outdated ] && echo c2; exit 0 ;;
|
||||
"compose pull") [ "$d" = badpull ] && { echo "pull access denied" >&2; exit 1; }; exit 0 ;;
|
||||
"compose down"|"compose up") exit 0 ;;
|
||||
"inspect -f")
|
||||
case "$4" in
|
||||
c1) echo "sha256:aaaaaaaaaaaaaaaaaaaa|nginx:latest|web" ;;
|
||||
c2) echo "sha256:bbbbbbbbbbbbbbbbbbbb|redis:7|cache" ;;
|
||||
esac; exit 0 ;;
|
||||
"image inspect")
|
||||
case "$5" in
|
||||
nginx:latest) [ "$d" = outdated ] && echo sha256:aaaaaaaaaaaaaaaaaaaa || echo sha256:aaaaaaaaaaaaaaaaaaaa ;;
|
||||
redis:7) echo sha256:cccccccccccccccccccc ;;
|
||||
esac; exit 0 ;;
|
||||
esac
|
||||
exit 1
|
||||
Reference in new issue
Block a user