semblance/docker-compose.yml
Vadym Samoilenko b481f616cb Single deploy.sh for server — frontend build via Node Docker container
- deploy.sh runs entirely on server, no local Mac needed
- docker-compose: add 'frontend' service (node:20-alpine, profile=build)
  builds frontend and copies dist/ to /var/www/html/semblance
- Remove server-deploy.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:26:39 +00:00

46 lines
993 B
YAML

services:
frontend:
image: node:20-alpine
working_dir: /app
volumes:
- .:/app
- /var/www/html/semblance:/app/dist-out
command: >
sh -c "cp .env.production .env &&
npm ci --silent &&
npm run build &&
cp -r dist/* /app/dist-out/"
profiles:
- build
mongo:
image: mongo:7
restart: unless-stopped
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./backend
restart: unless-stopped
ports:
- "127.0.0.1:5137:5137"
env_file:
- ./backend/.env
environment:
MONGO_URI: mongodb://mongo:27017/semblance_db
volumes:
- ./backend/uploads:/app/uploads
- ./backend/temp:/app/temp
depends_on:
mongo:
condition: service_healthy
volumes:
mongo-data: