From 6ad9dc54d2c3f786c2ebb3c912431dea8ce2432b Mon Sep 17 00:00:00 2001 From: MrSpaceCarrot <62132766+MrSpaceCarrot@users.noreply.github.com> Date: Wed, 17 Jan 2024 19:12:49 +1300 Subject: [PATCH 1/4] Added files --- README.md | 1 + game_eggs/README.md | 1 + game_eggs/minecraft/README.md | 1 + game_eggs/minecraft/proxy/README.md | 1 + game_eggs/minecraft/proxy/java/README.md | 4 ++ game_eggs/minecraft/proxy/java/gate/README.md | 10 +++++ .../minecraft/proxy/java/gate/egg-gate.json | 42 +++++++++++++++++++ 7 files changed, 60 insertions(+) create mode 100644 game_eggs/minecraft/proxy/java/gate/README.md create mode 100644 game_eggs/minecraft/proxy/java/gate/egg-gate.json diff --git a/README.md b/README.md index 62090d57..d025fca5 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,7 @@ If you are reading this it looks like you are looking to add an egg to your serv * [Proxies](game_eggs/minecraft/proxy) Minecraft Server Proxies * [Java](game_eggs/minecraft/proxy/java) + * [Gate](game_eggs/minecraft/proxy/java/gate) * [Travertine](game_eggs/minecraft/proxy/java/travertine) * [Velocity](game_eggs/minecraft/proxy/java/velocity) * [Waterfall](game_eggs/minecraft/proxy/java/waterfall) diff --git a/game_eggs/README.md b/game_eggs/README.md index 1a4b6b09..ae1bc5cf 100644 --- a/game_eggs/README.md +++ b/game_eggs/README.md @@ -98,6 +98,7 @@ * [Proxies](minecraft/proxy) Minecraft Server Proxies * [Java](minecraft/proxy/java) + * [Gate](minecraft/proxy/java/gate) * [Travertine](minecraft/proxy/java/travertine) * [Velocity](minecraft/proxy/java/velocity) * [Waterfall](minecraft/proxy/java/waterfall) diff --git a/game_eggs/minecraft/README.md b/game_eggs/minecraft/README.md index 9e374b05..4a5f8d32 100644 --- a/game_eggs/minecraft/README.md +++ b/game_eggs/minecraft/README.md @@ -46,6 +46,7 @@ It’s set in infinitely-generated worlds of wide open terrain - icy mountains, * [GeyserMC](proxy/cross_platform/geyser) * [Waterdog](proxy/cross_platform/waterdog) * [Java](proxy/java) + * [Gate](proxy/java/gate) * [Travertine](proxy/java/travertine) * [Velocity](proxy/java/velocity) * [VIAaas](proxy/java/viaaas) diff --git a/game_eggs/minecraft/proxy/README.md b/game_eggs/minecraft/proxy/README.md index a1c5b84f..2cf8b878 100644 --- a/game_eggs/minecraft/proxy/README.md +++ b/game_eggs/minecraft/proxy/README.md @@ -1,6 +1,7 @@ # Minecraft Proxies * [Java](/game_eggs/minecraft/proxy/java/) + * [Gate](/game_eggs/minecraft/proxy/java/gate) * [Travertine](/game_eggs/minecraft/proxy/java/travertine) * [Velocity](/game_eggs/minecraft/proxy/java/velocity) * [VIAaaS](/game_eggs/minecraft/proxy/java/viaaas) diff --git a/game_eggs/minecraft/proxy/java/README.md b/game_eggs/minecraft/proxy/java/README.md index 6cb3bc02..2b0cb9d0 100644 --- a/game_eggs/minecraft/proxy/java/README.md +++ b/game_eggs/minecraft/proxy/java/README.md @@ -1,6 +1,10 @@ # Minecraft Java Proxies +#### Gate +[Gate](https://github.com/minekube/gate) +High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy. + #### Travertine [Travertine](https://papermc.io/downloads#Travertine) Waterfall, with additional support for Minecraft 1.7.10. diff --git a/game_eggs/minecraft/proxy/java/gate/README.md b/game_eggs/minecraft/proxy/java/gate/README.md new file mode 100644 index 00000000..6e529a78 --- /dev/null +++ b/game_eggs/minecraft/proxy/java/gate/README.md @@ -0,0 +1,10 @@ +# Gate Minecraft Proxy +High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity/Bungee Replacement - Ready for dev and large deploy (Description from Github) + +## Server Ports +The minecraft server requires a single port for access (default 25565) but plugins may require extra ports to enabled for the server. + + +| Port | default | +|-------|---------| +| Game | 25565 | \ No newline at end of file diff --git a/game_eggs/minecraft/proxy/java/gate/egg-gate.json b/game_eggs/minecraft/proxy/java/gate/egg-gate.json new file mode 100644 index 00000000..194e741c --- /dev/null +++ b/game_eggs/minecraft/proxy/java/gate/egg-gate.json @@ -0,0 +1,42 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2024-01-17T18:45:42+13:00", + "name": "Gate", + "author": "mrspacecarrotdev@gmail.com", + "description": "High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity\/Bungee Replacement - Ready for dev and large deploy! (Description from Github)", + "features": null, + "docker_images": { + "ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian" + }, + "file_denylist": [], + "startup": ".\/gate", + "config": { + "files": "{\r\n \"config.yml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"config.bind\": \"0.0.0.0:{{server.build.default.port}}\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": \"listening\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n\r\n# Install dependencies\r\napt update\r\napt install -y curl jq\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\nMATCH=\"linux_amd64 \"\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\ncurl -L -o \/mnt\/server\/gate $DOWNLOAD_URL\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\necho \"Installation completed.\"", + "container": "golang:1.15-buster", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Gate Version", + "description": "Version of Gate to download, eg 'v0.36.4'. Set to 'latest' to download the latest version", + "env_variable": "VERSION", + "default_value": "latest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:20", + "field_type": "text" + } + ] +} \ No newline at end of file From a0fa6e796e7c798ec0a0e8245c8128b22750891d Mon Sep 17 00:00:00 2001 From: MrSpaceCarrot <62132766+MrSpaceCarrot@users.noreply.github.com> Date: Wed, 17 Jan 2024 20:09:49 +1300 Subject: [PATCH 2/4] Added support for different cpu architectures --- game_eggs/minecraft/proxy/java/gate/egg-gate.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_eggs/minecraft/proxy/java/gate/egg-gate.json b/game_eggs/minecraft/proxy/java/gate/egg-gate.json index 194e741c..dd361926 100644 --- a/game_eggs/minecraft/proxy/java/gate/egg-gate.json +++ b/game_eggs/minecraft/proxy/java/gate/egg-gate.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2024-01-17T18:45:42+13:00", + "exported_at": "2024-01-17T20:09:08+13:00", "name": "Gate", "author": "mrspacecarrotdev@gmail.com", "description": "High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity\/Bungee Replacement - Ready for dev and large deploy! (Description from Github)", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n# Install dependencies\r\napt update\r\napt install -y curl jq\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\nMATCH=\"linux_amd64 \"\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\ncurl -L -o \/mnt\/server\/gate $DOWNLOAD_URL\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\necho \"Installation completed.\"", + "script": "#!\/bin\/bash\r\n\r\n# Install dependencies\r\napt update\r\napt install -y curl jq\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\n\r\n# Determine CPU architecture, in order to get correct package\r\nARCHITECTURE=$(case $(uname -m) in x86_64) echo \"linux_amd64\";; aarch64) echo \"linux_arm64\";; i386) echo \"linux_386\";; *) echo \"unknown\";; esac)\r\necho \"CPU architecture is $ARCHITECTURE\"\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCHITECTURE})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\ncurl -L -o \/mnt\/server\/gate $DOWNLOAD_URL\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\necho \"Installation completed.\"", "container": "golang:1.15-buster", "entrypoint": "bash" } From d750b9fddba6c28419226380d3a869af17502909 Mon Sep 17 00:00:00 2001 From: MrSpaceCarrot <62132766+MrSpaceCarrot@users.noreply.github.com> Date: Wed, 17 Jan 2024 20:45:32 +1300 Subject: [PATCH 3/4] Changed architecture line in install script --- game_eggs/minecraft/proxy/java/gate/egg-gate.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_eggs/minecraft/proxy/java/gate/egg-gate.json b/game_eggs/minecraft/proxy/java/gate/egg-gate.json index dd361926..fedf633d 100644 --- a/game_eggs/minecraft/proxy/java/gate/egg-gate.json +++ b/game_eggs/minecraft/proxy/java/gate/egg-gate.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2024-01-17T20:09:08+13:00", + "exported_at": "2024-01-17T20:44:28+13:00", "name": "Gate", "author": "mrspacecarrotdev@gmail.com", "description": "High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity\/Bungee Replacement - Ready for dev and large deploy! (Description from Github)", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n# Install dependencies\r\napt update\r\napt install -y curl jq\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\n\r\n# Determine CPU architecture, in order to get correct package\r\nARCHITECTURE=$(case $(uname -m) in x86_64) echo \"linux_amd64\";; aarch64) echo \"linux_arm64\";; i386) echo \"linux_386\";; *) echo \"unknown\";; esac)\r\necho \"CPU architecture is $ARCHITECTURE\"\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCHITECTURE})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\ncurl -L -o \/mnt\/server\/gate $DOWNLOAD_URL\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\necho \"Installation completed.\"", + "script": "#!\/bin\/bash\r\n\r\n# Install dependencies\r\napt update\r\napt install -y curl jq\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\n\r\n# Determine CPU architecture, in order to get correct package\r\nARCHITECTURE=\"linux_$( [[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"arm64\" )\"\r\necho \"CPU architecture is $ARCHITECTURE\"\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCHITECTURE})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\ncurl -L -o \/mnt\/server\/gate $DOWNLOAD_URL\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\necho \"Installation completed.\"", "container": "golang:1.15-buster", "entrypoint": "bash" } From c5644a777ddf1fc7db95e8fb6d595ca1e33d8547 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:55:46 +0100 Subject: [PATCH 4/4] cleanup --- game_eggs/minecraft/proxy/java/gate/README.md | 11 ++++++++--- game_eggs/minecraft/proxy/java/gate/egg-gate.json | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/game_eggs/minecraft/proxy/java/gate/README.md b/game_eggs/minecraft/proxy/java/gate/README.md index 6e529a78..26a159aa 100644 --- a/game_eggs/minecraft/proxy/java/gate/README.md +++ b/game_eggs/minecraft/proxy/java/gate/README.md @@ -2,9 +2,14 @@ High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity/Bungee Replacement - Ready for dev and large deploy (Description from Github) ## Server Ports -The minecraft server requires a single port for access (default 25565) but plugins may require extra ports to enabled for the server. - | Port | default | |-------|---------| -| Game | 25565 | \ No newline at end of file +| Game | 25565 | + +### Notes + + +25565 is the default port, but any port can be used. + +### Mods/Plugins may require ports to be added to the server \ No newline at end of file diff --git a/game_eggs/minecraft/proxy/java/gate/egg-gate.json b/game_eggs/minecraft/proxy/java/gate/egg-gate.json index fedf633d..40cae1c1 100644 --- a/game_eggs/minecraft/proxy/java/gate/egg-gate.json +++ b/game_eggs/minecraft/proxy/java/gate/egg-gate.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2024-01-17T20:44:28+13:00", + "exported_at": "2024-01-17T14:53:01+01:00", "name": "Gate", "author": "mrspacecarrotdev@gmail.com", "description": "High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity\/Bungee Replacement - Ready for dev and large deploy! (Description from Github)", @@ -22,8 +22,8 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n# Install dependencies\r\napt update\r\napt install -y curl jq\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\n\r\n# Determine CPU architecture, in order to get correct package\r\nARCHITECTURE=\"linux_$( [[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"arm64\" )\"\r\necho \"CPU architecture is $ARCHITECTURE\"\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCHITECTURE})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\ncurl -L -o \/mnt\/server\/gate $DOWNLOAD_URL\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\necho \"Installation completed.\"", - "container": "golang:1.15-buster", + "script": "#!\/bin\/bash\r\n\r\n# Create \/mnt\/server directory if it doesn't exist\r\nmkdir -p \/mnt\/server\/\r\ncd \/mnt\/server\r\n\r\nif [ -f \/mnt\/server\/gate.old ]; then\r\n rm gate.old\r\nfi\r\n\r\nif [ -f \/mnt\/server\/gate ]; then\r\n mv gate gate.old\r\nfi\r\n\r\n# Determine latest version and get download link\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/minekube\/gate\/releases\")\r\n\r\n# Determine CPU architecture, in order to get correct package\r\nARCHITECTURE=$( [[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux_amd64\" || echo \"linux_arm64\" )\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCHITECTURE})\r\n else\r\n echo -e \"Specified version not found, defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCHITECTURE})\r\n fi\r\nfi\r\n\r\n# Download the Gate binary from GitHub releases\r\necho \"Download URL: ${DOWNLOAD_URL}\"\r\ncurl -sSL -o gate ${DOWNLOAD_URL}\r\n\r\n# Ensure the downloaded binary is executable\r\nchmod +x \/mnt\/server\/gate\r\n\r\n# Create config file if it doesn't already exist\r\nif [ ! -f \/mnt\/server\/config.yml ]; then\r\n cat < \/mnt\/server\/config.yml\r\n config:\r\n bind: 0.0.0.0:25565\r\n servers:\r\n server1: localhost:25566\r\n server2: localhost:25567\r\n try:\r\n - server1\r\n - server2\r\nEOL\r\nfi\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", + "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } },