WHAT WAS DONE: - Migrated Arbiter (discord-oauth-arbiter) code to services/arbiter/ - Migrated Modpack Version Checker code to services/modpack-version-checker/ - Created .env.example for Arbiter with all required environment variables - Moved systemd service file to services/arbiter/deploy/ - Organized directory structure per Gemini monorepo recommendations WHY: - Consolidate all service code in one repository - Prepare for Gemini code review (Panel v1.12 compatibility check) - Enable service-prefixed Git tagging (arbiter-v2.1.0, modpack-v1.0.0) - Support npm workspaces for shared dependencies SERVICES MIGRATED: 1. Arbiter (Discord OAuth bot) - Originally written by Gemini + Claude - Full source code from ops-manual docs/implementation/ - Created comprehensive .env.example - Ready for Panel v1.12 compatibility verification 2. Modpack Version Checker (Python CLI tool) - Full source code from ops-manual docs/tasks/ - Written for Panel v1.11, needs Gemini review for v1.12 - Never had code review before STILL TODO: - Whitelist Manager - Pull from Billing VPS (38.68.14.188) - Currently deployed and running - Needs Panel v1.12 API compatibility fix (Task #86) - Requires SSH access to pull code NEXT STEPS: - Gemini code review for Panel v1.12 API compatibility - Create package.json for each service - Test npm workspaces integration - Deploy after verification FILES: - services/arbiter/ (25 new files, full application) - services/modpack-version-checker/ (21 new files, full application) Signed-off-by: The Golden Chronicler <claude@firefrostgaming.com>
65 lines
2.0 KiB
Nginx Configuration File
65 lines
2.0 KiB
Nginx Configuration File
# Firefrost Arbiter - Nginx Configuration
|
|
# Location: /etc/nginx/sites-available/arbiter
|
|
# Enable with: sudo ln -s /etc/nginx/sites-available/arbiter /etc/nginx/sites-enabled/
|
|
# Then: sudo nginx -t && sudo systemctl reload nginx
|
|
|
|
# HTTP -> HTTPS Redirect
|
|
server {
|
|
listen 80;
|
|
server_name discord-bot.firefrostgaming.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# HTTPS Server Block
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name discord-bot.firefrostgaming.com;
|
|
|
|
# SSL Configuration (Let's Encrypt)
|
|
ssl_certificate /etc/letsencrypt/live/discord-bot.firefrostgaming.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/discord-bot.firefrostgaming.com/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
# Security Headers
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
|
|
# Access Logs
|
|
access_log /var/log/nginx/arbiter-access.log;
|
|
error_log /var/log/nginx/arbiter-error.log;
|
|
|
|
# Proxy Configuration
|
|
location / {
|
|
proxy_pass http://127.0.0.1:3500;
|
|
proxy_http_version 1.1;
|
|
|
|
# WebSocket Support (for Discord.js if needed)
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
|
|
# Proxy Headers
|
|
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;
|
|
|
|
# Cache Control
|
|
proxy_cache_bypass $http_upgrade;
|
|
}
|
|
|
|
# Health Check Endpoint (optional monitoring)
|
|
location /health {
|
|
proxy_pass http://127.0.0.1:3500/health;
|
|
access_log off;
|
|
}
|
|
}
|