fix: include FEDORA_COMPOSE_DIR in variable requirements and update paths in phase2_teardown.sh
This commit is contained in:
@@ -45,9 +45,10 @@ confirm_action() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
load_env
|
load_env
|
||||||
require_vars FEDORA_IP FEDORA_SSH_USER FEDORA_GITEA_DATA_PATH
|
require_vars FEDORA_IP FEDORA_SSH_USER FEDORA_GITEA_DATA_PATH FEDORA_COMPOSE_DIR
|
||||||
|
|
||||||
DATA_PATH="$FEDORA_GITEA_DATA_PATH"
|
DATA_PATH="$FEDORA_GITEA_DATA_PATH"
|
||||||
|
COMPOSE_DIR="${FEDORA_COMPOSE_DIR}/gitea"
|
||||||
|
|
||||||
log_warn "=== Phase 2 Teardown: Gitea on Fedora ==="
|
log_warn "=== Phase 2 Teardown: Gitea on Fedora ==="
|
||||||
|
|
||||||
@@ -58,10 +59,10 @@ TEARDOWN_FAILED=false
|
|||||||
# Step 1: Stop and remove the Gitea container
|
# Step 1: Stop and remove the Gitea container
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Check if docker-compose file exists (skip if already torn down)
|
# Check if docker-compose file exists (skip if already torn down)
|
||||||
if ssh_exec FEDORA "test -f '${DATA_PATH}/docker-compose.yml'" 2>/dev/null; then
|
if ssh_exec FEDORA "test -f '${COMPOSE_DIR}/docker-compose.yml'" 2>/dev/null; then
|
||||||
if confirm_action 'This will stop Gitea on Fedora. Continue? [y/N] '; then
|
if confirm_action 'This will stop Gitea on Fedora. Continue? [y/N] '; then
|
||||||
# Try modern "docker compose" first, fall back to standalone
|
# Try modern "docker compose" first, fall back to standalone
|
||||||
if ssh_exec FEDORA "cd '${DATA_PATH}' && docker compose down 2>/dev/null || docker-compose down"; then
|
if ssh_exec FEDORA "cd '${COMPOSE_DIR}' && docker compose down 2>/dev/null || docker-compose down"; then
|
||||||
log_success "Gitea container stopped and removed"
|
log_success "Gitea container stopped and removed"
|
||||||
else
|
else
|
||||||
log_error "Failed to stop/remove Gitea container via docker-compose"
|
log_error "Failed to stop/remove Gitea container via docker-compose"
|
||||||
|
|||||||
Reference in New Issue
Block a user