pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.84k stars 2.32k forks source link

[Egg Request]: Minekube Gate Proxy #2048

Open marfier opened 1 year ago

marfier commented 1 year ago

Does this expand an already existing service

No

Link to a game or software

https://gate.minekube.com/

Links for the download

https://gate.minekube.com/guide/install/

Links for the install docs

https://gate.minekube.com/guide/install/docker.html

QuintenQVD0 commented 1 year ago

We stated multiple times that we will not add more flavours of minecraft.

marfier commented 1 year ago

I understand that the list is getting big, but Gate is not just another flavor/fork of an Egg that already exists. It is a completely unique Minecraft server proxy.

I have tried implementing this myself, and this is where I've gotten.

{
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v2",
        "update_url": null
    },
    "exported_at": "2023-01-10T07:41:14+04:00",
    "name": "Gate",
    "author": "support@pterodactyl.io",
    "description": "Gate is a modern cloud-native, open source, fast, batteries-included and secure proxy for Minecraft servers with a focus on scalability, flexibility, multi-version support and developer friendliness.",
    "features": null,
    "docker_images": {
        "ghcr.io\/minekube\/gate": "ghcr.io\/minekube\/gate"
    },
    "file_denylist": [],
    "startup": "\/bin\/true",
    "config": {
        "files": "{\r\n    \"config.yml\": {\r\n        \"parser\": \"yml\",\r\n        \"config\": {\r\n            \"find\": {\r\n                \"bind\": \"0.0.0.0:{{server.build.default.port}}\"\r\n            }\r\n        }\r\n    }\r\n}",
        "startup": "{}",
        "logs": "{}",
        "stop": "^C"
    },
    "scripts": {
        "installation": {
            "script": null,
            "container": "alpine:3.4",
            "entrypoint": "ash"
        }
    },
    "variables": []
}

In essence, running Gate is incredibly easy. You just run docker run -it --rm ghcr.io/minekube/gate:latest.

QuintenQVD0 commented 1 year ago

I understand that the list is getting big, but Gate is not just another flavor/fork of an Egg that already exists. It is a completely unique Minecraft server proxy.

I have tried implementing this myself, and this is where I've gotten.

{
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v2",
        "update_url": null
    },
    "exported_at": "2023-01-10T07:41:14+04:00",
    "name": "Gate",
    "author": "support@pterodactyl.io",
    "description": "Gate is a modern cloud-native, open source, fast, batteries-included and secure proxy for Minecraft servers with a focus on scalability, flexibility, multi-version support and developer friendliness.",
    "features": null,
    "docker_images": {
        "ghcr.io\/minekube\/gate": "ghcr.io\/minekube\/gate"
    },
    "file_denylist": [],
    "startup": "\/bin\/true",
    "config": {
        "files": "{\r\n    \"config.yml\": {\r\n        \"parser\": \"yml\",\r\n        \"config\": {\r\n            \"find\": {\r\n                \"bind\": \"0.0.0.0:{{server.build.default.port}}\"\r\n            }\r\n        }\r\n    }\r\n}",
        "startup": "{}",
        "logs": "{}",
        "stop": "^C"
    },
    "scripts": {
        "installation": {
            "script": null,
            "container": "alpine:3.4",
            "entrypoint": "ash"
        }
    },
    "variables": []
}

In essence, running Gate is incredibly easy. You just run docker run -it --rm ghcr.io/minekube/gate:latest.

This is not how pterodactyl works. 1 non of the game files can be in the docker images. The docker image hold the packages the install container pulls the files 2 the startup must actuly run the .jar or bon not just /bin/true 3 the game image must be an offical java or debain

QuintenQVD0 commented 1 year ago

Please read this first: https://github.com/parkervcp/eggs/blob/master/CONTRIBUTING.md

marfier commented 1 year ago

Please read this first: https://github.com/parkervcp/eggs/blob/master/CONTRIBUTING.md

The program runs as soon as the Docker container initializes, so there is no need to manually execute it, which is why I set that to /bin/true. Also, it is a single binary with no dependencies, not a JAR.

QuintenQVD0 commented 1 year ago

Thats not how it works by pterodactyl standards

ItzSave commented 1 year ago

I think this would be very helpful as there are limited options for proxies as compared to java edition software. Whether it's posted officially or un-officially it'd be helpful to have a working egg for it.

QuintenQVD0 commented 1 year ago

I think this would be very helpful as there are limited options for proxies as compared to java edition software. Whether it's posted officially or un-officially it'd be helpful to have a working egg for it.

It is still open. As long as you know that the egg were the startup was just /bin/true never will be merged as no files can be ik the docker image.

dilllxd commented 9 months ago

Not sure if anyone was still interested in this or not but I tried to make this as decent as I could with very little Pterodactyl egg making experience. :P It seems to work okay from what I can tell, I know it very likely doesn't meet the standards for Pterodactyl eggs but it does store files properly unlike the docker version so it's editable and properly usable now. :)

Edit: Updated on 1/11 to include some better version detection stuff and also Gate Lite support :)

{
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v2",
        "update_url": null
    },
    "exported_at": "2024-01-11T17:29:47-05:00",
    "name": "Gate",
    "author": "pterodactyl@dylanh.dev",
    "description": "Gate is a modern cloud-native, open source, fast, batteries-included and secure proxy for Minecraft servers with a focus on scalability, flexibility, multi-version support and developer friendliness.",
    "features": null,
    "docker_images": {
        "ghcr.io\/pterodactyl\/yolks:debian": "ghcr.io\/pterodactyl\/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 for connections\"\r\n}",
        "logs": "{}",
        "stop": "^C"
    },
    "scripts": {
        "installation": {
            "script": "#!\/bin\/bash\r\n# Gate Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n# Update and install requirements\r\necho -e \"\\e[1;33mUpdating and installing requirements...\\e[0m\"\r\napt update && apt -y --no-install-recommends install ca-certificates wget curl jq\r\napt -q clean all\r\nclear\r\n\r\ncd \/mnt\/server\r\n\r\n# Check if GATE_VERSION is provided and available on GitHub\r\nif [ -z \"${GATE_VERSION}\" ] || [ \"${GATE_VERSION}\" == \"latest\" ]; then\r\n    GATE_VERSION=$(curl -s https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest | jq -r .tag_name)\r\n    echo -e \"\\e[1;36mGate Version selected is ${GATE_VERSION}\\e[0m\"\r\nelse\r\n    # Attempt to download the provided version\r\n    DOWNLOAD_URL=\"https:\/\/github.com\/minekube\/gate\/releases\/download\/${GATE_VERSION}\/gate_${GATE_VERSION#v}_linux_amd64\"\r\n    if wget -O \/dev\/null -q --spider \"${DOWNLOAD_URL}\"; then\r\n        echo -e \"\\e[1;32mDebug: Version ${GATE_VERSION} is available.\\e[0m\"\r\n    else\r\n        echo -e \"\\e[1;31mProvided GATE_VERSION (${GATE_VERSION}) is not available. Defaulting to latest.\\e[0m\"\r\n        GATE_VERSION=$(curl -s https:\/\/api.github.com\/repos\/minekube\/gate\/releases\/latest | jq -r .tag_name)\r\n        echo -e \"\\e[1;36mGate Version selected is ${GATE_VERSION}\\e[0m\"\r\n    fi\r\nfi\r\n\r\n# Determine if using Standard or Lite\r\nif [ -z \"${GATE_LITE}\" ] || [ \"${GATE_LITE}\" == \"1\" ]; then\r\n    # Check if Lite version is available for the provided version\r\n    LITE_CONFIG_URL=\"https:\/\/raw.githubusercontent.com\/minekube\/gate\/${GATE_VERSION}\/config-lite.yml\"\r\n    if wget -O \/dev\/null -q --spider \"${LITE_CONFIG_URL}\"; then\r\n        CONFIG_FILE=\"config-lite.yml\"\r\n        echo -e \"\\e[1;32mDebug: Lite version configuration is available.\\e[0m\"\r\n    else\r\n        CONFIG_FILE=\"config.yml\"\r\n        echo -e \"\\e[1;31mDebug: Lite version configuration is not available. Using regular configuration.\\e[0m\"\r\n    fi\r\nelse\r\n    CONFIG_FILE=\"config.yml\"\r\nfi\r\n\r\n# Download the selected version release\r\necho -e \"\\e[1;33mDownloading gate from https:\/\/github.com\/minekube\/gate\/releases\/download\/${GATE_VERSION}\/gate_${GATE_VERSION#v}_linux_amd64\\e[0m\"\r\nwget -O gate \"https:\/\/github.com\/minekube\/gate\/releases\/download\/${GATE_VERSION}\/gate_${GATE_VERSION#v}_linux_amd64\"\r\n\r\n# Download the config from the selected version branch\r\necho -e \"\\e[1;33mDownloading gate config from https:\/\/raw.githubusercontent.com\/minekube\/gate\/${GATE_VERSION}\/${CONFIG_FILE}\\e[0m\"\r\nwget -O config.yml \"https:\/\/raw.githubusercontent.com\/minekube\/gate\/${GATE_VERSION}\/${CONFIG_FILE}\"\r\n\r\n# Make the downloaded file executable\r\nchmod +x \"gate\"",
            "container": "debian:bullseye-slim",
            "entrypoint": "bash"
        }
    },
    "variables": [
        {
            "name": "Gate Version",
            "description": "The version of Gate to download. Make sure to include v in the version if you are specifying a specific version. Example: v0.36.2\r\n\r\nLeave at latest to always get the latest version. Invalid versions will default to latest.",
            "env_variable": "GATE_VERSION",
            "default_value": "latest",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string|max:20",
            "field_type": "text"
        },
        {
            "name": "Gate Lite",
            "description": "This sets if Gate is in Lite mode. Leave this off if you do not know what it is.\r\n\r\nAbout Gate Lite: https:\/\/gate.minekube.com\/guide\/lite",
            "env_variable": "GATE_LITE",
            "default_value": "0",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|boolean",
            "field_type": "text"
        }
    ]
}
robinbraemer commented 8 months ago

Awesome work, don't forget the link in case for your updates https://github.com/dilllxd/dylanpterodactyleggs