Phase 1 (Foundation): - Project restructure (presenton-main → backend/ + frontend/) - Database schema (8 new models, Alembic config, seed script) - Auth (Azure AD SSO + dev bypass, JWT sessions, AuthMiddleware) - RBAC (access_service, rbac_middleware, admin routers) - Audit logging (fire-and-forget, AuditMiddleware, admin router) - i18n (react-i18next with 5 namespace files) Phase 2 (Admin Panel & Client Management): - Admin panel shell (sidebar layout, role guard, 12 pages) - Redux admin slice with 18 async thunks - User management (role changes, deactivation) - Client management (CRUD, brand config, team management) - Brand config editor (colors, fonts, logos, voice rules) - Master deck upload & parser (PPTX → HTML → React pipeline) - Audit log viewer with filters and CSV/JSON export Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
102 lines
2.4 KiB
Nginx Configuration File
102 lines
2.4 KiB
Nginx Configuration File
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
client_max_body_size 100M;
|
|
|
|
upstream api_upstream {
|
|
server api:8000;
|
|
}
|
|
|
|
upstream web_upstream {
|
|
server web:3000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
# FastAPI backend
|
|
location /api/v1/ {
|
|
proxy_pass http://api_upstream;
|
|
proxy_http_version 1.1;
|
|
proxy_read_timeout 30m;
|
|
proxy_connect_timeout 30m;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
# SSE support
|
|
proxy_set_header Connection '';
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
chunked_transfer_encoding off;
|
|
}
|
|
|
|
# Swagger docs
|
|
location /docs {
|
|
proxy_pass http://api_upstream/docs;
|
|
proxy_read_timeout 30m;
|
|
proxy_connect_timeout 30m;
|
|
}
|
|
|
|
location /openapi.json {
|
|
proxy_pass http://api_upstream/openapi.json;
|
|
proxy_read_timeout 30m;
|
|
proxy_connect_timeout 30m;
|
|
}
|
|
|
|
# Static files from volume
|
|
location /app_data/images/ {
|
|
alias /app_data/images/;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /app_data/exports/ {
|
|
alias /app_data/exports/;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /app_data/uploads/ {
|
|
alias /app_data/uploads/;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /app_data/fonts/ {
|
|
alias /app_data/fonts/;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Static backend assets
|
|
location /static {
|
|
alias /app_data/static/;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Next.js frontend (catch-all)
|
|
location / {
|
|
proxy_pass http://web_upstream;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 30m;
|
|
proxy_connect_timeout 30m;
|
|
}
|
|
}
|
|
}
|