Recover local Sendico session after BFF network restarts (#57)

This commit is contained in:
Stephan D committed 2026-10-19 12:34:37 +02:00
1 parent 021bd04324
commit 13cc9c302e
9 files changed
+158 -8

No files matched your search

+13
View File
@@ -21,6 +21,19 @@ compose() {
docker compose --project-directory . -f infra/local/compose.yml --env-file "$STATE/images.env" "$@"
fi
}
# A recreated BFF has a new container ID. Recreate its namespace-sharing session
# in the same Compose operation so neither waits on the other's old namespace.
recreate_services() {
recreate_timeout=$1; shift
case " $* " in
*' bff '*)
if [ -f "$STATE/sendico/settings.env" ]; then
case " $* " in *' sendico '*) ;; *) set -- "$@" sendico;; esac
fi
;;
esac
compose up -d --no-deps --force-recreate --wait --wait-timeout "$recreate_timeout" "$@"
}
write() {
target=$1; mode=${2:-600}
mkdir -p "$(dirname "$target")"