portal/rel/overlays/bin/migrate
Mikael Hugo a4ca979cc2 fix: make server/migrate scripts app-agnostic
Detect the app binary by trying centralcloud_staff then centralcloud_my.
Fixes CrashLoopBackOff when centralcloud-staff image ran /app/bin/server
which was hardcoded to exec ./centralcloud_my (not found in staff image).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 13:52:44 +02:00

9 lines
291 B
Bash
Executable file

#!/bin/sh
set -eu
cd -P -- "$(dirname -- "$0")"
for pair in "centralcloud_staff CentralcloudStaff" "centralcloud_my CentralcloudMy"; do
bin="${pair%% *}"; mod="${pair##* }"
[ -f "./$bin" ] && exec "./$bin" eval "$mod.Release.migrate"
done
echo "No app binary found in $(pwd)" >&2
exit 1