diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 9aadcca..aeda8a2 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -20,11 +20,12 @@ jobs: - name: Copy env run: cp /opt/hotelsync/.env /opt/hotelsync/app/.env - - name: Build Docker image + - name: Build Docker images run: | cd /opt/hotelsync/app docker build -t hotelsync-frontend:latest . - echo "✅ Image built" + docker build -t hotelsync-cp:latest ./cp + echo "✅ Images built" - name: Restart frontend container run: | @@ -35,7 +36,18 @@ jobs: --network hotelsync_hotelsync-net \ --restart unless-stopped \ hotelsync-frontend:latest - echo "✅ Container started" + echo "✅ Frontend started" + + - name: Restart CP container + run: | + docker stop hotelsync-cp 2>/dev/null || true + docker rm hotelsync-cp 2>/dev/null || true + docker run -d \ + --name hotelsync-cp \ + --network hotelsync_hotelsync-net \ + --restart unless-stopped \ + hotelsync-cp:latest + echo "✅ CP started" - name: Health check run: | diff --git a/cp/Dockerfile b/cp/Dockerfile new file mode 100644 index 0000000..1a16b9c --- /dev/null +++ b/cp/Dockerfile @@ -0,0 +1,14 @@ +# ── Stage 1: Build ────────────────────────────────────────────────────────── +FROM node:20-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# ── Stage 2: Serve ────────────────────────────────────────────────────────── +FROM nginx:alpine +COPY --from=builder /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/cp/index.html b/cp/index.html new file mode 100644 index 0000000..d5685e2 --- /dev/null +++ b/cp/index.html @@ -0,0 +1,16 @@ + + +
+ + + +HotelSync SaaS · Обзор платформы
+{s.value}
+{s.label}
+{hotel.name}
+{hotel.address} · {hotel.roomCount} номеров
+{u.name}
+{u.email}
+Control Panel · Только для команды
++ Доступ только для сотрудников HotelSync Inc. +
+