Initial scaffold: FastAPI backend + Vue 3 frontend + Docker setup
Backend: config/db/security/logging core, SQLAlchemy models (Server, Credential, UpdateJob, UpdateLog, AuditLog, User), services (winrm, ssh, cau, audit, job_runner), REST API (auth, servers, updates, audit), Socket.io WebSocket layer. Frontend: Vue 3 + TS + Pinia + Tailwind, Views (Dashboard, Servers, Updates, Audit, Login), axios + socket.io-client, nginx prod config.
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# ---------------------------------------------------------------------------
|
||||
# BACKEND - FastAPI
|
||||
# ---------------------------------------------------------------------------
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: insight-updater-backend
|
||||
environment:
|
||||
- APP_ENV=development
|
||||
- DATABASE_URL=sqlite+aiosqlite:///./data/app.db
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- SECRET_KEY=${SECRET_KEY:-dev-secret-change-me-32-chars-min}
|
||||
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-dev-encryption-key-32-chars-base64}
|
||||
- JWT_ALGORITHM=RS256
|
||||
- JWT_PRIVATE_KEY_PATH=/app/keys/private.pem
|
||||
- JWT_PUBLIC_KEY_PATH=/app/keys/public.pem
|
||||
- WINRM_TRANSPORT=ntlm
|
||||
- WINRM_CERT_VALIDATION=ignore
|
||||
- LDAP_ENABLED=false
|
||||
- LOG_LEVEL=DEBUG
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./data:/app/data
|
||||
- ./backend/keys:/app/keys:ro
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
networks:
|
||||
- insight-updater-network
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# FRONTEND - Vue 3 + Vite (dev) / Nginx (prod)
|
||||
# ---------------------------------------------------------------------------
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
target: development
|
||||
container_name: insight-updater-frontend
|
||||
environment:
|
||||
- VITE_API_URL=http://localhost:8000
|
||||
- VITE_WS_URL=ws://localhost:8000
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- insight-updater-network
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# REDIS - for WebSocket pub/sub, caching, rate limiting
|
||||
# ---------------------------------------------------------------------------
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: insight-updater-redis
|
||||
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
networks:
|
||||
- insight-updater-network
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# POSTGRESQL (optional, for production)
|
||||
# ---------------------------------------------------------------------------
|
||||
# postgres:
|
||||
# image: postgres:16-alpine
|
||||
# container_name: insight-updater-postgres
|
||||
# environment:
|
||||
# - POSTGRES_DB=updater
|
||||
# - POSTGRES_USER=updater
|
||||
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
# volumes:
|
||||
# - postgres-data:/var/lib/postgresql/data
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
# healthcheck:
|
||||
# test: ["CMD-SHELL", "pg_isready -U updater -d updater"]
|
||||
# interval: 5s
|
||||
# timeout: 5s
|
||||
# retries: 5
|
||||
# networks:
|
||||
# - insight-updater-network
|
||||
|
||||
volumes:
|
||||
redis-data:
|
||||
# postgres-data:
|
||||
|
||||
networks:
|
||||
insight-updater-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user