Download index.html from wrpadmn/morph: direct link, hf CLI and curl.
- Browser
- Download file 41.6 kB
-
https://huggingface.co/spaces/wrpadmn/morph/resolve/main/index.html
- Command line
-
hf download hf://spaces/wrpadmn/morph/index.html
-
curl -L -o index.html https://huggingface.co/spaces/wrpadmn/morph/resolve/main/index.html
41.6 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Server Production Engine</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .server-card { | |
| transition: all 0.3s ease; | |
| } | |
| .server-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 20px rgba(0,0,0,0.1); | |
| } | |
| .progress-bar { | |
| height: 6px; | |
| transition: width 0.5s ease; | |
| } | |
| .config-tab { | |
| display: none; | |
| } | |
| .config-tab.active { | |
| display: block; | |
| } | |
| .animated-bg { | |
| background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); | |
| background-size: 400% 400%; | |
| animation: gradient 15s ease infinite; | |
| } | |
| @keyframes gradient { | |
| 0% { background-position: 0% 50%; } | |
| 50% { background-position: 100% 50%; } | |
| 100% { background-position: 0% 50%; } | |
| } | |
| .blink { | |
| animation: blink-animation 1.5s infinite; | |
| } | |
| @keyframes blink-animation { | |
| 0% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| 100% { opacity: 1; } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100"> | |
| <div class="min-h-screen"> | |
| <!-- Header --> | |
| <header class="animated-bg text-white"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h1 class="text-3xl font-bold">AI Server Production Engine</h1> | |
| <p class="mt-2">Automated server configuration generator with hardening</p> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <div class="bg-white bg-opacity-20 p-2 rounded-full"> | |
| <i class="fas fa-server text-2xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="container mx-auto px-4 py-8"> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> | |
| <!-- Input Form --> | |
| <div class="lg:col-span-1 bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-xl font-semibold mb-4">Server Specifications</h2> | |
| <form id="serverForm"> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2" for="serverName">Server Name</label> | |
| <input type="text" id="serverName" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="e.g., CORTEX" required> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2" for="serverType">Server Type</label> | |
| <select id="serverType" class="w-full px-3 py-2 border border-gray-300 rounded-md" required> | |
| <option value="">Select server type</option> | |
| <option value="windows-dc">Windows Datacenter (Domain Controller)</option> | |
| <option value="windows-iis">Windows Server with IIS</option> | |
| <option value="docker">Docker Container</option> | |
| <option value="ubuntu">Ubuntu Server</option> | |
| <option value="proxmox">Proxmox VM</option> | |
| </select> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2" for="ipAddress">IP Address</label> | |
| <input type="text" id="ipAddress" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="e.g., 10.239.165.102" required> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2" for="domain">Domain (if applicable)</label> | |
| <input type="text" id="domain" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="e.g., wrp.io"> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2" for="service">Service to Deploy</label> | |
| <select id="service" class="w-full px-3 py-2 border border-gray-300 rounded-md" required> | |
| <option value="">Select service</option> | |
| <option value="web">Web Server</option> | |
| <option value="db">Database Server</option> | |
| <option value="app">Application Server</option> | |
| <option value="file">File Server</option> | |
| <option value="auth">Authentication Server</option> | |
| </select> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2">Hardening Options</label> | |
| <div class="space-y-2"> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox" id="firewall" checked> | |
| <span class="ml-2">Firewall Configuration</span> | |
| </label> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox" id="ssl" checked> | |
| <span class="ml-2">SSL/TLS Setup</span> | |
| </label> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox" id="backup" checked> | |
| <span class="ml-2">Backup Configuration</span> | |
| </label> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox" id="monitoring" checked> | |
| <span class="ml-2">Monitoring Setup</span> | |
| </label> | |
| </div> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2" for="notes">Additional Notes</label> | |
| <textarea id="notes" class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="3" placeholder="Any special requirements..."></textarea> | |
| </div> | |
| <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-md transition duration-300 flex items-center justify-center"> | |
| <i class="fas fa-cogs mr-2"></i> Generate Configurations | |
| </button> | |
| </form> | |
| </div> | |
| <!-- Results Section --> | |
| <div class="lg:col-span-2"> | |
| <div id="processingSection" class="hidden bg-white rounded-xl shadow-md p-6 mb-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-xl font-semibold">Generating Configurations</h2> | |
| <div class="blink"> | |
| <i class="fas fa-circle-notch fa-spin text-blue-500"></i> | |
| </div> | |
| </div> | |
| <div class="mb-4"> | |
| <div class="flex justify-between text-sm text-gray-600 mb-1"> | |
| <span>Progress</span> | |
| <span id="progressPercent">0%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2.5"> | |
| <div id="progressBar" class="progress-bar bg-blue-600 rounded-full h-2.5" style="width: 0%"></div> | |
| </div> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="flex items-center"> | |
| <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3"> | |
| <i class="fas fa-check text-blue-500 text-sm"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Analyzing server specifications</p> | |
| <p class="text-sm text-gray-500">Determining optimal configuration approach</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center opacity-50" id="step2"> | |
| <div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center mr-3"> | |
| <i class="fas fa-cog text-gray-400 text-sm"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Generating base configuration</p> | |
| <p class="text-sm text-gray-500">Creating initial setup files</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center opacity-50" id="step3"> | |
| <div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center mr-3"> | |
| <i class="fas fa-cog text-gray-400 text-sm"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Applying security hardening</p> | |
| <p class="text-sm text-gray-500">Implementing firewall rules, permissions, etc.</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center opacity-50" id="step4"> | |
| <div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center mr-3"> | |
| <i class="fas fa-cog text-gray-400 text-sm"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Testing configurations</p> | |
| <p class="text-sm text-gray-500">Validating in sandbox environment</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center opacity-50" id="step5"> | |
| <div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center mr-3"> | |
| <i class="fas fa-cog text-gray-400 text-sm"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Preparing download packages</p> | |
| <p class="text-sm text-gray-500">Creating one-click deploy solutions</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="resultsSection" class="hidden bg-white rounded-xl shadow-md p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-xl font-semibold">Generated Configurations</h2> | |
| <div class="flex space-x-2"> | |
| <button id="refreshBtn" class="px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-md text-sm flex items-center"> | |
| <i class="fas fa-sync-alt mr-1 text-gray-600"></i> Refresh | |
| </button> | |
| <button id="newConfigBtn" class="px-3 py-1 bg-blue-100 hover:bg-blue-200 text-blue-600 rounded-md text-sm flex items-center"> | |
| <i class="fas fa-plus mr-1"></i> New Config | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mb-4 border-b border-gray-200"> | |
| <ul class="flex flex-wrap -mb-px" id="configTabs"> | |
| <li class="mr-2"> | |
| <button class="inline-block p-4 border-b-2 border-blue-600 rounded-t-lg text-blue-600" data-tab="tab1">Option 1</button> | |
| </li> | |
| <li class="mr-2"> | |
| <button class="inline-block p-4 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300" data-tab="tab2">Option 2</button> | |
| </li> | |
| <li class="mr-2"> | |
| <button class="inline-block p-4 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300" data-tab="tab3">Option 3</button> | |
| </li> | |
| </ul> | |
| </div> | |
| <div id="tab1" class="config-tab active"> | |
| <div class="bg-gray-50 p-4 rounded-lg mb-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h3 class="font-medium">Standard Configuration</h3> | |
| <p class="text-sm text-gray-500">Balanced between performance and security</p> | |
| </div> | |
| <span class="bg-green-100 text-green-800 text-xs font-medium px-2.5 py-0.5 rounded">Recommended</span> | |
| </div> | |
| </div> | |
| <div class="mb-4"> | |
| <h4 class="font-medium mb-2">Configuration Details</h4> | |
| <div class="bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto"> | |
| <pre id="configContent1" class="text-sm font-mono"></pre> | |
| </div> | |
| </div> | |
| <div class="mb-4"> | |
| <h4 class="font-medium mb-2">Placeholders to Replace</h4> | |
| <ul class="list-disc pl-5 text-sm text-gray-600 space-y-1"> | |
| <li><code>%%SERVER_IP%%</code> - Replace with your server's IP address</li> | |
| <li><code>%%DOMAIN_NAME%%</code> - Replace with your domain name</li> | |
| <li><code>%%ADMIN_EMAIL%%</code> - Replace with admin contact email</li> | |
| </ul> | |
| </div> | |
| <div class="flex flex-wrap gap-3"> | |
| <button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md flex items-center"> | |
| <i class="fas fa-download mr-2"></i> Download Config | |
| </button> | |
| <button class="px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-md flex items-center"> | |
| <i class="fas fa-terminal mr-2"></i> Deploy Script | |
| </button> | |
| <button class="px-4 py-2 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-md flex items-center"> | |
| <i class="fas fa-code mr-2"></i> View Dockerfile | |
| </button> | |
| </div> | |
| </div> | |
| <div id="tab2" class="config-tab"> | |
| <div class="bg-gray-50 p-4 rounded-lg mb-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h3 class="font-medium">High Security Configuration</h3> | |
| <p class="text-sm text-gray-500">Maximum security with potential performance impact</p> | |
| </div> | |
| <span class="bg-yellow-100 text-yellow-800 text-xs font-medium px-2.5 py-0.5 rounded">Strict</span> | |
| </div> | |
| </div> | |
| <div class="mb-4"> | |
| <h4 class="font-medium mb-2">Configuration Details</h4> | |
| <div class="bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto"> | |
| <pre id="configContent2" class="text-sm font-mono"></pre> | |
| </div> | |
| </div> | |
| <div class="flex flex-wrap gap-3"> | |
| <button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md flex items-center"> | |
| <i class="fas fa-download mr-2"></i> Download Config | |
| </button> | |
| <button class="px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-md flex items-center"> | |
| <i class="fas fa-terminal mr-2"></i> Deploy Script | |
| </button> | |
| </div> | |
| </div> | |
| <div id="tab3" class="config-tab"> | |
| <div class="bg-gray-50 p-4 rounded-lg mb-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h3 class="font-medium">Performance-Optimized</h3> | |
| <p class="text-sm text-gray-500">Maximum performance with basic security</p> | |
| </div> | |
| <span class="bg-purple-100 text-purple-800 text-xs font-medium px-2.5 py-0.5 rounded">Fast</span> | |
| </div> | |
| </div> | |
| <div class="mb-4"> | |
| <h4 class="font-medium mb-2">Configuration Details</h4> | |
| <div class="bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto"> | |
| <pre id="configContent3" class="text-sm font-mono"></pre> | |
| </div> | |
| </div> | |
| <div class="flex flex-wrap gap-3"> | |
| <button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md flex items-center"> | |
| <i class="fas fa-download mr-2"></i> Download Config | |
| </button> | |
| <button class="px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-md flex items-center"> | |
| <i class="fas fa-terminal mr-2"></i> Deploy Script | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="serverCards" class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-6"> | |
| <!-- Server cards will be added here dynamically --> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const form = document.getElementById('serverForm'); | |
| const processingSection = document.getElementById('processingSection'); | |
| const resultsSection = document.getElementById('resultsSection'); | |
| const progressBar = document.getElementById('progressBar'); | |
| const progressPercent = document.getElementById('progressPercent'); | |
| const configContent1 = document.getElementById('configContent1'); | |
| const configContent2 = document.getElementById('configContent2'); | |
| const configContent3 = document.getElementById('configContent3'); | |
| const serverCards = document.getElementById('serverCards'); | |
| const refreshBtn = document.getElementById('refreshBtn'); | |
| const newConfigBtn = document.getElementById('newConfigBtn'); | |
| // Tab switching | |
| document.querySelectorAll('[data-tab]').forEach(tab => { | |
| tab.addEventListener('click', function() { | |
| const tabId = this.getAttribute('data-tab'); | |
| // Hide all tabs | |
| document.querySelectorAll('.config-tab').forEach(t => { | |
| t.classList.remove('active'); | |
| }); | |
| // Show selected tab | |
| document.getElementById(tabId).classList.add('active'); | |
| // Update tab buttons | |
| document.querySelectorAll('[data-tab]').forEach(t => { | |
| t.classList.remove('border-blue-600', 'text-blue-600'); | |
| t.classList.add('border-transparent'); | |
| }); | |
| this.classList.add('border-blue-600', 'text-blue-600'); | |
| this.classList.remove('border-transparent'); | |
| }); | |
| }); | |
| // Form submission | |
| form.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Get form values | |
| const serverName = document.getElementById('serverName').value; | |
| const serverType = document.getElementById('serverType').value; | |
| const ipAddress = document.getElementById('ipAddress').value; | |
| const domain = document.getElementById('domain').value; | |
| const service = document.getElementById('service').value; | |
| const firewall = document.getElementById('firewall').checked; | |
| const ssl = document.getElementById('ssl').checked; | |
| const backup = document.getElementById('backup').checked; | |
| const monitoring = document.getElementById('monitoring').checked; | |
| const notes = document.getElementById('notes').value; | |
| // Show processing section | |
| processingSection.classList.remove('hidden'); | |
| resultsSection.classList.add('hidden'); | |
| // Simulate processing | |
| simulateProcessing(serverName, serverType, ipAddress, domain, service, firewall, ssl, backup, monitoring, notes); | |
| }); | |
| // Refresh button | |
| refreshBtn.addEventListener('click', function() { | |
| // In a real app, this would fetch updated configurations | |
| alert('Configurations refreshed with latest optimizations'); | |
| }); | |
| // New config button | |
| newConfigBtn.addEventListener('click', function() { | |
| processingSection.classList.add('hidden'); | |
| resultsSection.classList.add('hidden'); | |
| form.reset(); | |
| }); | |
| function simulateProcessing(serverName, serverType, ipAddress, domain, service, firewall, ssl, backup, monitoring, notes) { | |
| let progress = 0; | |
| const interval = setInterval(() => { | |
| progress += 5; | |
| if (progress > 100) progress = 100; | |
| progressBar.style.width = `${progress}%`; | |
| progressPercent.textContent = `${progress}%`; | |
| // Update steps | |
| if (progress >= 20) document.getElementById('step2').classList.remove('opacity-50'); | |
| if (progress >= 40) document.getElementById('step3').classList.remove('opacity-50'); | |
| if (progress >= 60) document.getElementById('step4').classList.remove('opacity-50'); | |
| if (progress >= 80) document.getElementById('step5').classList.remove('opacity-50'); | |
| if (progress === 100) { | |
| clearInterval(interval); | |
| setTimeout(() => { | |
| processingSection.classList.add('hidden'); | |
| resultsSection.classList.remove('hidden'); | |
| generateConfigurations(serverName, serverType, ipAddress, domain, service, firewall, ssl, backup, monitoring, notes); | |
| addServerCard(serverName, serverType, ipAddress, domain); | |
| }, 500); | |
| } | |
| }, 200); | |
| } | |
| function generateConfigurations(serverName, serverType, ipAddress, domain, service, firewall, ssl, backup, monitoring, notes) { | |
| // Generate different configuration options based on server type | |
| let config1, config2, config3; | |
| if (serverType === 'windows-dc') { | |
| // Domain Controller configuration | |
| config1 = `# Windows Server Domain Controller Configuration | |
| # Server: ${serverName} | |
| # IP: ${ipAddress} | |
| # Domain: ${domain} | |
| Import-Module ActiveDirectory | |
| # Promote server to domain controller | |
| Install-WindowsFeature AD-Domain-Services -IncludeManagementTools | |
| Install-ADDSForest -DomainName "${domain}" -DomainNetbiosName "${serverName}" -InstallDns -Force | |
| # Basic hardening | |
| if (${firewall}) { | |
| Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True | |
| # Add firewall rules... | |
| } | |
| if (${ssl}) { | |
| # SSL certificate configuration | |
| # Replace %%ADMIN_EMAIL%% with actual admin email | |
| $cert = New-SelfSignedCertificate -DnsName "${domain}", "${serverName}.${domain}" -CertStoreLocation "cert:\\LocalMachine\\My" -NotAfter (Get-Date).AddYears(2) | |
| # Configure IIS or other services to use cert... | |
| } | |
| if (${backup}) { | |
| # Backup configuration | |
| # Replace %%BACKUP_LOCATION%% with your backup path | |
| $backupScript = @' | |
| # Daily backup script | |
| # Backup AD, DNS, etc. | |
| '@ | |
| Set-Content -Path "C:\\Scripts\\ADBackup.ps1" -Value $backupScript | |
| } | |
| if (${monitoring}) { | |
| # Monitoring setup | |
| Install-WindowsFeature -Name "RSAT-SMTP" -IncludeAllSubFeature | |
| # Configure monitoring agent... | |
| }`; | |
| config2 = `# Strict Security Domain Controller Configuration | |
| # Additional security measures that may impact functionality | |
| # Enhanced security policies | |
| secedit /configure /cfg C:\\Windows\\inf\\defltbase.inf /db defltbase.sdb /verbose | |
| # Disable legacy protocols | |
| Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol | |
| Set-SmbServerConfiguration -EncryptData $true -Force | |
| # Advanced audit policies | |
| auditpol /set /category:"Account Logon","Logon/Logoff","Object Access","Policy Change","Privilege Use","Detailed Tracking","System","Account Management" /success:enable /failure:enable | |
| # Restricted firewall rules | |
| New-NetFirewallRule -DisplayName "Block All Inbound" -Direction Inbound -Action Block | |
| New-NetFirewallRule -DisplayName "Allow Specific" -Direction Inbound -Action Allow -RemoteAddress 10.0.0.0/8 -Protocol TCP -LocalPort 53,88,389,636,3268,3269 | |
| # Additional notes: | |
| # - Consider implementing LAPS for local admin passwords | |
| # - Enable Credential Guard if supported by hardware | |
| # - Configure JEA for administrative tasks`; | |
| config3 = `# Performance-Optimized Domain Controller | |
| # Focused on reducing overhead while maintaining security | |
| # Optimize AD database | |
| ntdsutil "ac i ntds" "files" "compact to c:\\temp" q q | |
| # Tune performance parameters | |
| Set-ADDomainController -Identity ${serverName} -DynamicDnsUpdateEnabled $true -IsGlobalCatalog $true -AllowPasswordReplicationAccountName "" | |
| # Reduced logging | |
| auditpol /set /category:"System" /success:disable /failure:disable | |
| Set-ItemProperty -Path "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa" -Name "LsaDbExtPtTimeout" -Value 30000 | |
| # Notes: | |
| # - Consider increasing AD garbage collection interval | |
| # - Adjust tombstone lifetime based on your environment | |
| # - Optimize DNS scavenging settings`; | |
| } | |
| else if (serverType === 'docker') { | |
| // Docker configuration | |
| config1 = `# Docker Web Server Configuration | |
| # Server: ${serverName} | |
| # IP: ${ipAddress} | |
| version: '3.8' | |
| services: | |
| web: | |
| image: nginx:latest | |
| container_name: ${serverName}-web | |
| restart: unless-stopped | |
| ports: | |
| - "80:80" | |
| ${ssl ? '- "443:443"' : ''} | |
| volumes: | |
| - ./html:/usr/share/nginx/html | |
| ${ssl ? '- ./certs:/etc/nginx/certs' : ''} | |
| - ./nginx.conf:/etc/nginx/nginx.conf | |
| environment: | |
| - NGINX_HOST=${domain || ipAddress} | |
| networks: | |
| - webnet | |
| ${backup ? ` backup: | |
| image: alpine | |
| container_name: ${serverName}-backup | |
| restart: on-failure | |
| volumes: | |
| - ./html:/source | |
| - ./backups:/backup | |
| command: sh -c "tar czf /backup/backup-$$(date +%Y%m%d).tar.gz /source" | |
| networks: | |
| - webnet` : ''} | |
| ${monitoring ? ` monitor: | |
| image: prom/prometheus:latest | |
| container_name: ${serverName}-monitor | |
| restart: unless-stopped | |
| ports: | |
| - "9090:9090" | |
| volumes: | |
| - ./prometheus.yml:/etc/prometheus/prometheus.yml | |
| networks: | |
| - webnet` : ''} | |
| networks: | |
| webnet: | |
| driver: bridge | |
| # Placeholders to replace: | |
| # - Configure ./nginx.conf with your specific web server settings | |
| # - For SSL, place certificates in ./certs directory | |
| # - For monitoring, configure ./prometheus.yml`; | |
| config2 = `# High Security Docker Configuration | |
| # Additional security measures | |
| version: '3.8' | |
| services: | |
| web: | |
| image: nginx:latest | |
| container_name: ${serverName}-web-secure | |
| restart: unless-stopped | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| read_only: true | |
| security_opt: | |
| - no-new-privileges:true | |
| cap_drop: | |
| - ALL | |
| cap_add: | |
| - NET_BIND_SERVICE | |
| volumes: | |
| - ./html:/usr/share/nginx/html:ro | |
| - ./certs:/etc/nginx/certs:ro | |
| - ./nginx-secure.conf:/etc/nginx/nginx.conf:ro | |
| environment: | |
| - NGINX_HOST=${domain || ipAddress} | |
| networks: | |
| - securenet | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: "10m" | |
| max-file: "3" | |
| apparmor: | |
| image: busybox | |
| container_name: ${serverName}-apparmor | |
| command: sh -c "echo 'Applying AppArmor profile...' && sleep infinity" | |
| security_opt: | |
| - apparmor=docker-nginx | |
| networks: | |
| securenet: | |
| driver: bridge | |
| internal: true | |
| # Additional security recommendations: | |
| # 1. Enable user namespace remapping in Docker daemon | |
| # 2. Implement image signing with Docker Content Trust | |
| # 3. Use seccomp profiles for additional restrictions | |
| # 4. Consider network segmentation with multiple networks`; | |
| config3 = `# Performance-Optimized Docker Setup | |
| # Focused on maximizing throughput | |
| version: '3.8' | |
| services: | |
| web: | |
| image: nginx:alpine | |
| container_name: ${serverName}-web-fast | |
| restart: unless-stopped | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - ./html:/usr/share/nginx/html | |
| - ./certs:/etc/nginx/certs | |
| - ./nginx-perf.conf:/etc/nginx/nginx.conf | |
| environment: | |
| - NGINX_WORKER_PROCESSES=auto | |
| - NGINX_WORKER_CONNECTIONS=4096 | |
| - NGINX_KEEPALIVE_TIMEOUT=65 | |
| networks: | |
| - perfnet | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '2' | |
| memory: 2G | |
| reservations: | |
| cpus: '0.5' | |
| memory: 512M | |
| networks: | |
| perfnet: | |
| driver: bridge | |
| driver_opts: | |
| com.docker.network.driver.mtu: 1500 | |
| com.docker.network.bridge.enable_icc: "true" | |
| # Performance tuning recommendations: | |
| # 1. Adjust worker_processes and worker_connections in nginx.conf | |
| # 2. Consider HTTP/2 and gzip compression | |
| # 3. Enable kernel-level tuning (sysctl) on host | |
| # 4. For high traffic, consider load balancing across multiple containers`; | |
| } | |
| else { | |
| // Default configuration (Ubuntu) | |
| config1 = `# Ubuntu Server Configuration | |
| # Server: ${serverName} | |
| # IP: ${ipAddress} | |
| #!/bin/bash | |
| # Update system | |
| apt-get update && apt-get upgrade -y | |
| # Install web server | |
| apt-get install -y nginx | |
| ${firewall ? `# Configure firewall | |
| ufw allow ssh | |
| ufw allow http | |
| ${ssl ? 'ufw allow https' : ''} | |
| ufw --force enable` : ''} | |
| ${ssl ? `# SSL configuration | |
| apt-get install -y certbot python3-certbot-nginx | |
| certbot --nginx -d ${domain || ipAddress} --non-interactive --agree-tos --email %%ADMIN_EMAIL%%` : ''} | |
| ${backup ? `# Backup setup | |
| apt-get install -y cron | |
| echo "0 3 * * * root tar czf /var/backups/website-$(date +\%Y\%m\%d).tar.gz /var/www/html" > /etc/cron.d/website-backup` : ''} | |
| ${monitoring ? `# Monitoring setup | |
| apt-get install -y prometheus-node-exporter | |
| systemctl enable prometheus-node-exporter` : ''} | |
| # Basic hardening | |
| sed -i 's/^PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config | |
| systemctl restart sshd | |
| # Placeholders to replace: | |
| # %%ADMIN_EMAIL%% - Replace with admin email for SSL certificates`; | |
| config2 = `# High Security Ubuntu Configuration | |
| # Additional security measures | |
| #!/bin/bash | |
| # Install security tools | |
| apt-get update && apt-get install -y unattended-upgrades fail2ban rkhunter aide | |
| # Configure automatic security updates | |
| echo 'APT::Periodic::Update-Package-Lists "1"; | |
| APT::Periodic::Unattended-Upgrade "1"; | |
| APT::Periodic::AutocleanInterval "7";' > /etc/apt/apt.conf.d/20auto-upgrades | |
| # Enhanced SSH security | |
| echo "AllowUsers %%ADMIN_USER%% | |
| Protocol 2 | |
| PermitRootLogin no | |
| MaxAuthTries 3 | |
| LoginGraceTime 60 | |
| ClientAliveInterval 300 | |
| ClientAliveCountMax 2 | |
| X11Forwarding no | |
| PrintMotd yes | |
| TCPKeepAlive no | |
| AllowAgentForwarding no | |
| AllowTcpForwarding no | |
| PermitTunnel no" > /etc/ssh/sshd_config.d/security.conf | |
| # Kernel hardening | |
| echo "kernel.kptr_restrict=2 | |
| kernel.dmesg_restrict=1 | |
| kernel.perf_event_paranoid=3 | |
| net.ipv4.conf.all.rp_filter=1 | |
| net.ipv4.conf.default.rp_filter=1 | |
| net.ipv4.tcp_syncookies=1 | |
| net.ipv4.tcp_rfc1337=1 | |
| net.ipv4.conf.all.accept_redirects=0 | |
| net.ipv4.conf.default.accept_redirects=0 | |
| net.ipv6.conf.all.accept_redirects=0 | |
| net.ipv6.conf.default.accept_redirects=0" > /etc/sysctl.d/99-security.conf | |
| # Additional recommendations: | |
| # 1. Implement 2FA for SSH | |
| # 2. Configure auditd for comprehensive logging | |
| # 3. Consider SELinux or AppArmor profiles | |
| # 4. Set up file integrity monitoring with aide`; | |
| config3 = `# Performance-Optimized Ubuntu Setup | |
| # Focused on maximizing server performance | |
| #!/bin/bash | |
| # Performance tuning | |
| echo "vm.swappiness=10 | |
| vm.vfs_cache_pressure=50 | |
| net.core.rmem_max=16777216 | |
| net.core.wmem_max=16777216 | |
| net.ipv4.tcp_rmem=4096 87380 16777216 | |
| net.ipv4.tcp_wmem=4096 65536 16777216 | |
| net.core.somaxconn=4096 | |
| net.ipv4.tcp_fastopen=3" > /etc/sysctl.d/99-performance.conf | |
| # Install tuned | |
| apt-get update && apt-get install -y tuned | |
| tuned-adm profile throughput-performance | |
| # Nginx performance tuning | |
| sed -i 's/worker_processes auto;/worker_processes 4;/' /etc/nginx/nginx.conf | |
| echo "worker_rlimit_nofile 100000; | |
| events { | |
| worker_connections 4000; | |
| multi_accept on; | |
| use epoll; | |
| }" >> /etc/nginx/nginx.conf | |
| # Database performance (if applicable) | |
| # echo "innodb_buffer_pool_size = 4G | |
| # innodb_log_file_size = 256M | |
| # innodb_flush_log_at_trx_commit = 2" >> /etc/mysql/my.cnf | |
| # Recommendations: | |
| # 1. Adjust worker_processes based on CPU cores (nproc) | |
| # 2. Consider using a more performant filesystem like XFS | |
| # 3. For database servers, tune memory parameters | |
| # 4. Enable HTTP/2 and brotli compression`; | |
| } | |
| // Set the configuration content | |
| configContent1.textContent = config1; | |
| configContent2.textContent = config2; | |
| configContent3.textContent = config3; | |
| } | |
| function addServerCard(serverName, serverType, ipAddress, domain) { | |
| const typeMap = { | |
| 'windows-dc': { name: 'Windows DC', icon: 'windows', color: 'blue' }, | |
| 'windows-iis': { name: 'Windows IIS', icon: 'microsoft', color: 'green' }, | |
| 'docker': { name: 'Docker', icon: 'docker', color: 'indigo' }, | |
| 'ubuntu': { name: 'Ubuntu', icon: 'ubuntu', color: 'orange' }, | |
| 'proxmox': { name: 'Proxmox', icon: 'server', color: 'red' } | |
| }; | |
| const serverTypeInfo = typeMap[serverType] || { name: 'Server', icon: 'server', color: 'gray' }; | |
| const card = document.createElement('div'); | |
| card.className = 'server-card bg-white rounded-lg shadow p-4'; | |
| card.innerHTML = ` | |
| <div class="flex items-start justify-between"> | |
| <div class="flex items-center"> | |
| <div class="bg-${serverTypeInfo.color}-100 p-3 rounded-full mr-4"> | |
| <i class="fab fa-${serverTypeInfo.icon} text-${serverTypeInfo.color}-600 text-xl"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-bold text-lg">${serverName}</h3> | |
| <p class="text-sm text-gray-500">${serverTypeInfo.name} Server</p> | |
| </div> | |
| </div> | |
| <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Active</span> | |
| </div> | |
| <div class="mt-4 pt-4 border-t border-gray-100"> | |
| <div class="grid grid-cols-2 gap-4 text-sm"> | |
| <div> | |
| <p class="text-gray-500">IP Address</p> | |
| <p class="font-medium">${ipAddress}</p> | |
| </div> | |
| <div> | |
| <p class="text-gray-500">Domain</p> | |
| <p class="font-medium">${domain || 'N/A'}</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-4 flex justify-between items-center"> | |
| <button class="text-sm text-blue-600 hover:text-blue-800 flex items-center"> | |
| <i class="fas fa-eye mr-1"></i> View | |
| </button> | |
| <div class="flex space-x-2"> | |
| <button class="text-sm text-gray-500 hover:text-gray-700 flex items-center"> | |
| <i class="fas fa-edit mr-1"></i> Edit | |
| </button> | |
| <button class="text-sm text-red-500 hover:text-red-700 flex items-center"> | |
| <i class="fas fa-trash-alt mr-1"></i> Delete | |
| </button> | |
| </div> | |
| </div> | |
| `; | |
| serverCards.prepend(card); | |
| } | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=wrpadmn/morph" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |