Files
xenia-pos-cloud/docker-compose.yml
bonamin b45a93a559 feat(connect): Phase 7 — Docker & nginx for connect_frontend
connect_frontend/Dockerfile
  Multi-stage build: node:20-alpine builds both menu-app and
  manager-app in parallel stages, then nginx:alpine serves both
  dist folders under /menu and /manage respectively.
  VITE_CLOUD_URL passed as build arg so the API URL is baked
  in at build time (standard Vite pattern).

connect_frontend/nginx-connect.conf
  Single nginx server block:
    /menu/   → /usr/share/nginx/html/menu  (SPA fallback)
    /manage/ → /usr/share/nginx/html/manage (SPA fallback)
    /health  → 200 ok

nginx-connect.conf
  Kept at cloud-service root for reference / standalone use.

docker-compose.yml
  connect_frontend service added:
    - build context: ./connect_frontend
    - VITE_CLOUD_URL passed from root .env
    - port 3100:80
    - depends_on cloud_backend

Individual Dockerfiles also added to menu-app/ and manager-app/
for standalone builds if needed.

To deploy:
  docker compose build connect_frontend
  docker compose up -d connect_frontend

  Public menu:    http://<host>:3100/menu/<site_slug>
  Manager app:    http://<host>:3100/manage/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 01:00:56 +03:00

32 lines
628 B
YAML

services:
cloud_backend:
build: ./cloud_backend
ports:
- "8001:8001"
restart: unless-stopped
env_file:
- ./cloud_backend/.env
volumes:
- ${BACKEND_DATA}:/app/data
sysadmin_panel:
build:
context: ./sysadmin_panel
args:
VITE_CLOUD_URL: ${VITE_CLOUD_URL}
ports:
- "5175:80"
restart: unless-stopped
depends_on:
- cloud_backend
connect_frontend:
build:
context: ./connect_frontend
args:
VITE_CLOUD_URL: ${VITE_CLOUD_URL}
ports:
- "3100:80"
restart: unless-stopped
depends_on:
- cloud_backend