Automate immutable production deployments
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
install_root="${WATERMAPS_INSTALL_DIR:-/opt/watermaps}"
|
||||
[[ "$install_root" == /* && "$install_root" != "/" ]] || {
|
||||
printf 'Ungültiges Watermaps-Installationsverzeichnis: %s\n' "$install_root" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
current_script="$install_root/current/deploy/scripts/auto-deploy.sh"
|
||||
bootstrap_script="$install_root/deploy/scripts/auto-deploy.sh"
|
||||
|
||||
if [[ -x "$current_script" ]]; then
|
||||
exec "$current_script"
|
||||
fi
|
||||
if [[ -x "$bootstrap_script" ]]; then
|
||||
exec "$bootstrap_script"
|
||||
fi
|
||||
|
||||
printf 'Kein Watermaps-Auto-Deploy-Skript gefunden.\n' >&2
|
||||
exit 1
|
||||
Reference in New Issue
Block a user