Update k8s/games/minecraft/deployments.yaml
All checks were successful
Check with kubeconform / lint (push) Successful in 11s
All checks were successful
Check with kubeconform / lint (push) Successful in 11s
This commit is contained in:
@@ -6,39 +6,73 @@ metadata:
|
|||||||
namespace: minecraft
|
namespace: minecraft
|
||||||
data:
|
data:
|
||||||
nginx.conf: |
|
nginx.conf: |
|
||||||
user nginx;
|
user nginx;
|
||||||
worker_processes 1;
|
worker_processes 1;
|
||||||
error_log /var/log/nginx/error.log warn;
|
error_log /var/log/nginx/error.log warn;
|
||||||
pid /var/run/nginx.pid;
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:8123;
|
proxy_pass http://localhost:8123;
|
||||||
sub_filter 'Minecraft Dynamic Map' "Hexor's MC server";
|
sub_filter 'Minecraft Dynamic Map' "Hexor's MC server";
|
||||||
sub_filter "</body>" '<p style="background-color: #CEC6CB; color: black; padding: 10px 10px; text-align: center; font-size: large; text-decoration: none; display: inline-block; border-radius: 4px; position: absolute; top: 10px; left: 150px;">Get <a href="https://github.com/PrismLauncher/PrismLauncher/releases/tag/8.4" >Prism Launcher</a> and <a href="/clients/1.12.2.zip" >client.zip</a> for this server. Server address <b>minecraft.hexor.cy:30565</b><br><br><a href="#" onclick="showInstallScript(); return false;" style="color: #0066cc; text-decoration: underline;">Windows Install Script</a></p><script>function showInstallScript() {var scriptText = "iwr -useb https://minecraft.hexor.cy/clients/win-install.ps1 | iex";alert("Copy and paste this command into PowerShell (run as Administrator):\\n\\n" + scriptText);}</script></body>';
|
sub_filter "</body>" '<p style="background-color: #CEC6CB; color: black; padding: 10px 10px; text-align: center; font-size: large; text-decoration: none; display: inline-block; border-radius: 4px; position: absolute; top: 10px; left: 150px;">Get <a href="https://github.com/PrismLauncher/PrismLauncher/releases/tag/8.4" >Prism Launcher</a> and <a href="/clients/1.12.2.zip" >client.zip</a> for this server. Server address <b>minecraft.hexor.cy:30565</b><br><br><a href="#" onclick="showInstallModal(); return false;" style="color: #0066cc; text-decoration: underline;">Windows Install Script</a></p>
|
||||||
sub_filter_once off;
|
<div id="installModal" style="display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5);">
|
||||||
|
<div style="background-color: #fefefe; margin: 15% auto; padding: 20px; border: 1px solid #888; width: 70%; max-width: 500px; border-radius: 8px; text-align: center;">
|
||||||
|
<h3 style="margin-top: 0;">Windows Installation</h3>
|
||||||
|
<p>Copy and paste this command into PowerShell (run as Administrator):</p>
|
||||||
|
<textarea id="scriptCommand" readonly style="width: 100%; height: 60px; font-family: monospace; padding: 8px; border: 1px solid #ccc; border-radius: 4px; resize: none;">iwr -useb https://minecraft.hexor.cy/clients/win-install.ps1 | iex</textarea>
|
||||||
|
<br><br>
|
||||||
|
<button onclick="copyToClipboard()" style="background-color: #4CAF50; color: white; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px;">Copy</button>
|
||||||
|
<button onclick="closeInstallModal()" style="background-color: #f44336; color: white; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer;">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
function showInstallModal() {
|
||||||
|
document.getElementById("installModal").style.display = "block";
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeInstallModal() {
|
||||||
|
document.getElementById("installModal").style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyToClipboard() {
|
||||||
|
var textarea = document.getElementById("scriptCommand");
|
||||||
|
textarea.select();
|
||||||
|
textarea.setSelectionRange(0, 99999);
|
||||||
|
document.execCommand("copy");
|
||||||
|
alert("Command copied to clipboard!");
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onclick = function(event) {
|
||||||
|
var modal = document.getElementById("installModal");
|
||||||
|
if (event.target == modal) {
|
||||||
|
closeInstallModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>';
|
||||||
|
sub_filter_once off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /clients/ {
|
||||||
|
alias /mc/clients/;
|
||||||
|
sendfile on;
|
||||||
|
add_header Content-Disposition "attachment";
|
||||||
|
autoindex on;
|
||||||
|
gzip off;
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location /clients/ {
|
|
||||||
alias /mc/clients/;
|
|
||||||
sendfile on;
|
|
||||||
add_header Content-Disposition "attachment";
|
|
||||||
autoindex on;
|
|
||||||
|
|
||||||
gzip off;
|
|
||||||
chunked_transfer_encoding off;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Reference in New Issue
Block a user