feat: clean
Laravel CI-CD / Tests Unitaires (push) Successful in 21s Details
Laravel CI-CD / Build & Push Docker (push) Successful in 40s Details
Laravel CI-CD / Deploy Blue/Green (push) Successful in 16s Details

This commit is contained in:
Leon Morival 2026-05-19 15:35:07 +02:00
parent b8ef2d7b82
commit 32a13602d8
1 changed files with 1 additions and 15 deletions

View File

@ -60,7 +60,7 @@ jobs:
docker push "$IMAGE:latest" docker push "$IMAGE:latest"
# ========================= # =========================
# DEPLOY BLUE / GREEN + SWITCH NGINX # DEPLOY BLUE / GREEN (CADDY GÈRE LE ROUTING)
# ========================= # =========================
deploy: deploy:
name: Deploy Blue/Green name: Deploy Blue/Green
@ -97,7 +97,6 @@ jobs:
APP_DIR="${DEPLOY_PATH:-/opt/bemeal}" APP_DIR="${DEPLOY_PATH:-/opt/bemeal}"
COMPOSE_FILE="docker-compose.prod.yml" COMPOSE_FILE="docker-compose.prod.yml"
NGINX_CONTAINER="nginx"
cd "$APP_DIR" cd "$APP_DIR"
@ -164,19 +163,6 @@ jobs:
docker exec "$TARGET_SERVICE" wget -qO- http://127.0.0.1/api/health >/dev/null || exit 1 docker exec "$TARGET_SERVICE" wget -qO- http://127.0.0.1/api/health >/dev/null || exit 1
echo "API healthy → switching Nginx"
# =========================
# NGINX SWITCH AUTOMATIQUE
# =========================
if [ "$TARGET" = "blue" ]; then
echo "server bemeal-api-blue:80;" > /opt/bemeal/nginx/upstream.conf
else
echo "server bemeal-api-green:80;" > /opt/bemeal/nginx/upstream.conf
fi
docker exec "$NGINX_CONTAINER" nginx -s reload
echo "Deployment successful" echo "Deployment successful"
# ========================= # =========================