#!/bin/bash set -e cd /data/web-cad-neu echo "[$(date)] Pulling latest code..." git pull origin master echo "[$(date)] Building backend image..." docker build -t web-cad-neu-backend:latest ./backend echo "[$(date)] Building frontend image..." docker build -t web-cad-neu-frontend:latest ./frontend echo "[$(date)] Redeploying containers..." cd /data/coolify/services/cnuavrh33goa3zs0upi6hgif docker compose up -d --force-recreate echo "[$(date)] Health check..." sleep 5 docker exec backend-cnuavrh33goa3zs0upi6hgif wget -qO- http://localhost:3001/api/health echo echo "[$(date)] Frontend check..." curl -sk -o /dev/null -w "%{http_code}" https://web-cad-neu.server.media-on.de echo echo "[$(date)] Deploy complete!"