diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 3dd7a53..654b794 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -25,8 +25,22 @@ jobs: cd /opt/hotelsync/app docker build -t hotelsync-frontend:latest . docker build -t hotelsync-cp:latest ./cp + docker build -t hotelsync-api:latest ./backend echo "✅ Images built" + - name: Restart API container + run: | + docker stop hotelsync-api 2>/dev/null || true + docker rm hotelsync-api 2>/dev/null || true + docker run -d \ + --name hotelsync-api \ + --network hotelsync_hotelsync-net \ + --network-alias api \ + --restart unless-stopped \ + --env-file /opt/hotelsync/.env \ + hotelsync-api:latest + echo "✅ API started" + - name: Restart frontend container run: | docker stop hotelsync-frontend 2>/dev/null || true