From 8d4bf02e370c01285d7b6bd831d11f3a39174cfd Mon Sep 17 00:00:00 2001 From: root Date: Mon, 27 Jul 2026 17:32:31 +0900 Subject: [PATCH] =?UTF-8?q?BARON-SSO=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=97=B0=EB=8F=99,=20=EB=B0=B0=ED=8F=AC=20=EC=8B=A4=ED=8C=A8?= =?UTF-8?q?=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy_remote.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/scripts/deploy_remote.sh b/scripts/deploy_remote.sh index f8be0d8..772386d 100755 --- a/scripts/deploy_remote.sh +++ b/scripts/deploy_remote.sh @@ -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