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>
9 lines
291 B
Bash
Executable file
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
|