workspace/projects/trading-platform/nginx/trading.conf
rckrdmrd 513a86ceee
Some checks are pending
CI Pipeline / changes (push) Waiting to run
CI Pipeline / core (push) Blocked by required conditions
CI Pipeline / trading-backend (push) Blocked by required conditions
CI Pipeline / trading-data-service (push) Blocked by required conditions
CI Pipeline / trading-frontend (push) Blocked by required conditions
CI Pipeline / erp-core (push) Blocked by required conditions
CI Pipeline / erp-mecanicas (push) Blocked by required conditions
CI Pipeline / gamilit-backend (push) Blocked by required conditions
CI Pipeline / gamilit-frontend (push) Blocked by required conditions
Major update: orchestration system, catalog references, and multi-project enhancements
Core:
- Add catalog reference implementations (auth, payments, notifications, websocket, etc.)
- New agent profiles: Database Auditor, Integration Validator, LLM Agent, Policy Auditor, Trading Strategist
- Update SIMCO directives and add escalation/git guidelines
- Add deployment inventory and audit execution reports

Projects:
- erp-suite: DevOps configs, Dockerfiles, shared libs, vertical enhancements
- gamilit: Test structure, admin controllers, service refactoring, husky/commitlint
- trading-platform: MT4 gateway, auth controllers, admin frontend, deployment scripts
- platform_marketing_content: Full DevOps setup, tests, Docker configs
- betting-analytics/inmobiliaria-analytics: Initial app structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 22:53:55 -06:00

136 lines
3.9 KiB
Plaintext

# =============================================================================
# TRADING PLATFORM - Nginx Configuration
# =============================================================================
# Copiar a: /etc/nginx/conf.d/trading.conf
# Servidor: 72.60.226.4
# =============================================================================
# Upstreams
upstream trading_frontend {
server 127.0.0.1:3080;
keepalive 32;
}
upstream trading_backend {
server 127.0.0.1:3081;
keepalive 32;
}
upstream trading_websocket {
server 127.0.0.1:3082;
keepalive 32;
}
# HTTP -> HTTPS Redirect
server {
listen 80;
server_name trading.isem.dev api.trading.isem.dev ws.trading.isem.dev;
return 301 https://$server_name$request_uri;
}
# Frontend - trading.isem.dev
server {
listen 443 ssl http2;
server_name trading.isem.dev;
# SSL
ssl_certificate /etc/letsencrypt/live/isem.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/isem.dev/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
ssl_prefer_server_ciphers off;
# Security Headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# Gzip
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
# Logging
access_log /var/log/nginx/trading-frontend-access.log;
error_log /var/log/nginx/trading-frontend-error.log;
# Frontend
location / {
proxy_pass http://trading_frontend;
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_cache_bypass $http_upgrade;
}
# Static assets cache
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
proxy_pass http://trading_frontend;
expires 1y;
add_header Cache-Control "public, immutable";
}
}
# Backend API - api.trading.isem.dev
server {
listen 443 ssl http2;
server_name api.trading.isem.dev;
ssl_certificate /etc/letsencrypt/live/isem.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/isem.dev/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# Rate Limiting
limit_req zone=api_limit burst=20 nodelay;
limit_conn conn_limit 10;
# Logging
access_log /var/log/nginx/trading-api-access.log;
error_log /var/log/nginx/trading-api-error.log;
# Client body size (for file uploads)
client_max_body_size 50M;
location / {
proxy_pass http://trading_backend;
proxy_http_version 1.1;
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;
# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
location /health {
proxy_pass http://trading_backend/health;
access_log off;
}
}
# WebSocket - ws.trading.isem.dev
server {
listen 443 ssl http2;
server_name ws.trading.isem.dev;
ssl_certificate /etc/letsencrypt/live/isem.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/isem.dev/privkey.pem;
location / {
proxy_pass http://trading_websocket;
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_read_timeout 86400;
}
}