This commit is contained in:
Bulut Kuru
2026-03-27 21:06:38 +03:00
parent f6c815ee88
commit f46b9d795d
285 changed files with 47574 additions and 90 deletions

28
scripts/deploy-test.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -euo pipefail
PROJECT_DIR="/opt/projects/bogazici/corporate-admin/test/admin"
BRANCH="test"
CONTAINER="bdc-admin-test"
COMPOSE_FILE="docker-compose.test.yml"
echo "🚀 [Admin] Test deploy başlatılıyor..."
cd "$PROJECT_DIR"
# Git sync
git fetch origin
git checkout "$BRANCH"
git reset --hard "origin/$BRANCH"
git clean -fd
# Docker - stop & remove any existing container first
docker stop "$CONTAINER" 2>/dev/null || true
docker rm "$CONTAINER" 2>/dev/null || true
docker compose -f "$COMPOSE_FILE" down --remove-orphans 2>/dev/null || true
docker compose -f "$COMPOSE_FILE" up -d --build
# Cleanup
docker image prune -f 2>/dev/null || true
echo "✅ [Admin] Test deploy tamamlandı"