Separate CP admin panel into independent Vite project at /cp/
- New /cp/ Vite project with own package.json, Dockerfile, tailwind config - Migrated CpLoginPage, CpLayout, AdminDashboard → cp/src/ (self-contained) - cp/src/lib/utils.ts has only what CP needs (cn, PLAN_LABELS, PLAN_COLORS) - cp/src/data/mockData.ts has Hotel/User types and mock data - cp/ builds to nginx static container (hotelsync-cp) - docker-compose.yml: added cp service - nginx: added cp.hotelsync.ru → hotelsync-cp:80 (SSL block ready for certbot) - deploy.yml: builds hotelsync-cp:latest and restarts container on push - Cleaned src/App.tsx: removed IS_CP branch, CpLoginPage/CpLayout/AdminDashboard imports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ version: '3.9'
|
||||
|
||||
services:
|
||||
|
||||
# ── Frontend (React) ───────────────────────────────────────────────────────
|
||||
# ── Frontend (React PMS) ───────────────────────────────────────────────────
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
@@ -12,6 +12,16 @@ services:
|
||||
networks:
|
||||
- hotelsync-net
|
||||
|
||||
# ── CP (Control Panel) ─────────────────────────────────────────────────────
|
||||
cp:
|
||||
build:
|
||||
context: ./cp
|
||||
dockerfile: Dockerfile
|
||||
container_name: hotelsync-cp
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- hotelsync-net
|
||||
|
||||
# ── API (Node.js + Fastify + PostgreSQL) ──────────────────────────────────
|
||||
api:
|
||||
build:
|
||||
@@ -75,6 +85,7 @@ services:
|
||||
- certbot_certs:/etc/letsencrypt:ro
|
||||
depends_on:
|
||||
- frontend
|
||||
- cp
|
||||
- api
|
||||
networks:
|
||||
- hotelsync-net
|
||||
|
||||
Reference in New Issue
Block a user