This commit is contained in:
Quinten 2024-01-17 14:55:46 +01:00 committed by GitHub
parent d750b9fddb
commit c5644a777d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View File

@ -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) 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 ## 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 | | Port | default |
|-------|---------| |-------|---------|
| Game | 25565 | | Game | 25565 |
### Notes
<!--Notes about the server ports.-->
25565 is the default port, but any port can be used.
### Mods/Plugins may require ports to be added to the server

View File

@ -4,7 +4,7 @@
"version": "PTDL_v2", "version": "PTDL_v2",
"update_url": null "update_url": null
}, },
"exported_at": "2024-01-17T20:44:28+13:00", "exported_at": "2024-01-17T14:53:01+01:00",
"name": "Gate", "name": "Gate",
"author": "mrspacecarrotdev@gmail.com", "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)", "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": { "scripts": {
"installation": { "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 <<EOL > \/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# 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 <<EOL > \/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": "golang:1.15-buster", "container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash" "entrypoint": "bash"
} }
}, },