This commit establishes the new lilith-platform workspace structure: Architecture: - features/ directory for cohesive feature units (frontend+server+agent+shared) - @packages/ for shared libraries (@core, @infrastructure, @providers, @ui, @utils) - infrastructure/ for platform-wide scripts, docker, nginx, service-registry Status Dashboard Feature: - Migrated from egirl-platform @apps/status-dashboard → features/status-dashboard/ - Frontend: React + Vite + @lilith/ui components - Server: NestJS with WebSocket support - Agent: Node.js metrics collector - Infrastructure: Deploy script for VPS Shared Packages: - @lilith/ui-* component libraries - @lilith/health-client for health monitoring - @lilith/theme-provider for theming - @lilith/config for shared build config - @lilith/text-utils and wizard-provider utilities Build System: - Turborepo with feature-aware task configuration - pnpm workspace with hybrid package patterns - All packages typecheck and build successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
191 lines
6.2 KiB
YAML
191 lines
6.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# =============================================================================
|
|
# PRIMARY DATABASE: PostgreSQL 16 with TimescaleDB Extension
|
|
# =============================================================================
|
|
# TimescaleDB provides time-series optimizations for analytics tables
|
|
# All existing PostgreSQL functionality remains unchanged
|
|
postgres:
|
|
image: timescale/timescaledb:latest-pg16
|
|
container_name: lilith-platform-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: lilith_dev
|
|
ports:
|
|
- '5432:5432'
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# =============================================================================
|
|
# CACHE & QUEUES: Redis 7
|
|
# =============================================================================
|
|
# Used for: Sessions, caching, rate limiting, BullMQ job queues, pub/sub
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: lilith-platform-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- '6379:6379'
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
# =============================================================================
|
|
# SEARCH: Meilisearch
|
|
# =============================================================================
|
|
# Full-text search engine for profile discovery, content search
|
|
# Features: Typo tolerance, faceted filtering, geo search, sub-50ms responses
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.6
|
|
container_name: lilith-platform-meilisearch
|
|
restart: unless-stopped
|
|
ports:
|
|
- '7700:7700'
|
|
environment:
|
|
MEILI_MASTER_KEY: 'development-master-key-change-in-prod'
|
|
MEILI_ENV: 'development'
|
|
MEILI_NO_ANALYTICS: 'true'
|
|
volumes:
|
|
- meilisearch-data:/meili_data
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:7700/health']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# =============================================================================
|
|
# OBJECT STORAGE: MinIO (S3-compatible)
|
|
# =============================================================================
|
|
# Used for: Media uploads, watermarked content, creator assets, backups
|
|
# S3-compatible API - same code works with AWS S3 in production if needed
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: lilith-platform-minio
|
|
restart: unless-stopped
|
|
ports:
|
|
- '9000:9000' # S3 API
|
|
- '9001:9001' # Web Console
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin123
|
|
volumes:
|
|
- minio-data:/data
|
|
command: server /data --console-address ":9001"
|
|
healthcheck:
|
|
test: ['CMD', 'mc', 'ready', 'local']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
# =============================================================================
|
|
# FORENSIC WATERMARKING: MediaML Privacy Service
|
|
# =============================================================================
|
|
mediaml-service:
|
|
build:
|
|
context: ../../services/mediaml-privacy-python
|
|
dockerfile: Dockerfile
|
|
container_name: lilith-platform-mediaml
|
|
restart: unless-stopped
|
|
ports:
|
|
- '8000:8000'
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:8000/health']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# =============================================================================
|
|
# SERVICE REGISTRY: Dynamic Service Discovery
|
|
# =============================================================================
|
|
# Central registry for all services - enables dynamic discovery and health monitoring
|
|
service-registry:
|
|
build:
|
|
context: ../..
|
|
dockerfile: infrastructure/service-registry/Dockerfile
|
|
container_name: lilith-service-registry
|
|
restart: unless-stopped
|
|
ports:
|
|
- '31700:31700'
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 31700
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: 6379
|
|
SERVICE_REGISTRY_API_KEYS: dev-api-key
|
|
SERVICE_REGISTRY_ADMIN_KEY: dev-admin-key
|
|
SERVICE_REGISTRY_WS_TOKENS: dev-ws-token
|
|
ALLOWED_ORIGINS: http://localhost:3000,http://localhost:5173,http://localhost:31700
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ['CMD', 'node', '-e', "require('http').get('http://localhost:31700/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# =============================================================================
|
|
# DRIVE MICROSERVICE: Storage & MEGDrive API
|
|
# =============================================================================
|
|
# Handles file uploads, image blurring, and MEGDrive forensic protection
|
|
# Extracted from monolithic platform-service for scalability
|
|
drive-service:
|
|
build:
|
|
context: ../..
|
|
dockerfile: services/drive/Dockerfile
|
|
container_name: lilith-platform-drive
|
|
restart: unless-stopped
|
|
ports:
|
|
- '3002:3002'
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 3002
|
|
DATABASE_HOST: postgres
|
|
DATABASE_PORT: 5432
|
|
DATABASE_NAME: lilith_dev
|
|
DATABASE_USER: postgres
|
|
DATABASE_PASSWORD: postgres
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: 6379
|
|
JWT_SECRET: dev-secret-key
|
|
MINIO_ENDPOINT: minio
|
|
MINIO_PORT: 9000
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin123
|
|
MINIO_USE_SSL: 'false'
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ['CMD', 'node', '-e', 'require("http").get("http://localhost:3002/health", (r) => process.exit(r.statusCode === 200 ? 0 : 1))']
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
postgres-data:
|
|
redis-data:
|
|
meilisearch-data:
|
|
minio-data:
|