BARON-SSO 로그인 연동, 배포 실패 개선
This commit is contained in:
@@ -48,7 +48,30 @@ mkdir -p \
|
||||
|
||||
mkdir -p docker/mysql/init
|
||||
|
||||
docker compose up -d --build
|
||||
docker_compose_up_with_retry() {
|
||||
local max_attempts=3
|
||||
local attempt=1
|
||||
|
||||
while (( attempt <= max_attempts )); do
|
||||
echo "[deploy] docker compose up attempt ${attempt}/${max_attempts}"
|
||||
|
||||
if docker compose up -d --build; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if (( attempt == max_attempts )); then
|
||||
echo "[deploy] docker compose up failed after ${max_attempts} attempts" >&2
|
||||
echo "[deploy] check server docker/systemd state: systemctl status docker, systemctl status dbus, journalctl -u docker -n 200" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "[deploy] docker compose up failed, retrying shortly..." >&2
|
||||
sleep 10
|
||||
attempt=$((attempt + 1))
|
||||
done
|
||||
}
|
||||
|
||||
docker_compose_up_with_retry
|
||||
|
||||
if [[ -f "$db_dump_path" && ! -f "$db_import_marker" ]]; then
|
||||
for _ in $(seq 1 30); do
|
||||
|
||||
Reference in New Issue
Block a user