Skip to content

Commit

Permalink
ptero eggs compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintenQVD0 committed Jun 2, 2024
1 parent d8fd549 commit 8a27c5f
Show file tree
Hide file tree
Showing 16 changed files with 975 additions and 0 deletions.
42 changes: 42 additions & 0 deletions 5e-tools/egg-pterodactyl-5e-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-02T14:40:56+00:00",
"name": "5e Tools",
"author": "[email protected]",
"description": "A suite of tools for 5th Edition Dungeons \u0026 Dragons players and Dungeon Masters.",
"features": null,
"docker_images": {
"ghcr.io/parkervcp/yolks:debian": "ghcr.io/parkervcp/yolks:debian"
},
"file_denylist": [],
"startup": "cd ~/5e-tools \u0026\u0026 git pull \u0026\u0026 cd \u0026\u0026 ./caddy run --config ~/caddy.json",
"config": {
"files": "{\r\n \"caddy.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"apps.http.servers.srv0.listen.0\": \":{{server.build.default.port}}\"\r\n }\r\n }\r\n}",
"logs": "{}",
"startup": "{\r\n \"done\": \"serving initial configuration\"\r\n}",
"stop": "^C"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n# 5e Tools install script\r\n#\r\n# Server Files: /mnt/server\r\ndeclare -r DIR=\"/mnt/server\"\r\ndeclare -r CADDY_INSTALL_URL=\"https://caddyserver.com/api/download?os=linux\u0026arch=amd64\u0026idempotency=41554620449867\"\r\ndeclare -r LOCAL_REPO=\"${DIR}/5e-tools\"\r\n\r\ndie() {\r\n local message=\"$1\"\r\n printf \"\\n%s\\n\" \"${message}\"\r\n exit 2\r\n}\r\ncd_error() {\r\n die \"ERROR: installation encountered an error while trying to change directory\"\r\n}\r\n\r\nmain() {\r\n local git_origin\r\n apt update\r\n apt install -y wget\r\n cd \"${DIR}\" || cd_error\r\n printf \"\\nInstalling Caddy...\\n\"\r\n wget \"${CADDY_INSTALL_URL}\" -O ./caddy\r\n chmod +x ./caddy\r\n printf \"\\nGenerating Caddy configuration...\\n\"\r\n # this is a default config\r\n # key variables, such as the port, will get overwritten with the pterodactyl\r\n # configuration parser\r\n cat \u003c\u003cEOF \u003e\"${DIR}/caddy.json\"\r\n{\r\n \"apps\": {\r\n \"http\": {\r\n \"servers\": {\r\n \"srv0\": {\r\n \"listen\": [\r\n \":8080\"\r\n ],\r\n \"routes\": [\r\n {\r\n \"handle\": [\r\n {\r\n \"handler\": \"vars\",\r\n \"root\": \"/home/container/5e-tools\"\r\n },\r\n {\r\n \"encodings\": {\r\n \"gzip\": {},\r\n \"zstd\": {}\r\n },\r\n \"handler\": \"encode\",\r\n \"prefer\": [\r\n \"zstd\",\r\n \"gzip\"\r\n ]\r\n },\r\n {\r\n \"handler\": \"file_server\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n }\r\n}\r\nEOF\r\n git config --global pull.ff only\r\n if [[ ! -d \"${LOCAL_REPO}\" ]]; then\r\n printf \"\\nCloning latest version (this may take a while)...\\n\"\r\n # $REPOSITORY is passed via environment variable from pterodactyl\r\n git clone \"${REPOSITORY}\" \"${LOCAL_REPO}\"\r\n else\r\n cd \"${LOCAL_REPO}\" || cd_error\r\n git_origin=\"$(git config --get remote.origin.url)\"\r\n cd \"${DIR}\" || cd_error\r\n printf \"\\n\\ngit origin is %s\\n\\n\" \"${git_origin}\"\r\n # if the user hasn't change the repository variable\r\n if [[ \"${git_origin}\" == \"${REPOSITORY}\" ]]; then\r\n cd \"${LOCAL_REPO}\" || cd_error\r\n printf \"\\nRepository already installed - updating...\\n\"\r\n git fetch --all\r\n git reset --hard origin/master\r\n git pull\r\n cd \"${DIR}\" || cd_error\r\n else\r\n printf \"\\nRepository variable changed since last update\\n...\\n\"\r\n rm -rf \"${LOCAL_REPO}\"\r\n git clone \"${REPOSITORY}\" \"${LOCAL_REPO}\"\r\n fi\r\n fi\r\n printf \"\\nInstallation Complete\\n\"\r\n}\r\nmain \"@\""
}
},
"variables": [
{
"name": "5e Tools Repository",
"description": "Git Repository to use for cloning 5e Tools",
"env_variable": "REPOSITORY",
"default_value": "https://github.com/5etools-mirror-1/5etools-mirror-1.github.io",
"user_viewable": false,
"user_editable": false,
"rules": "required|url",
"field_type": "text"
}
]
}
56 changes: 56 additions & 0 deletions code-server/egg-pterodactyl-code--server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-02T14:40:57+00:00",
"name": "Code-Server",
"author": "[email protected]",
"description": "Run VS Code on any machine anywhere and access it in the browser.",
"features": null,
"docker_images": {
"ghcr.io/parkervcp/yolks:nodejs_12": "ghcr.io/parkervcp/yolks:nodejs_12",
"ghcr.io/parkervcp/yolks:nodejs_14": "ghcr.io/parkervcp/yolks:nodejs_14",
"ghcr.io/parkervcp/yolks:nodejs_16": "ghcr.io/parkervcp/yolks:nodejs_16",
"ghcr.io/parkervcp/yolks:nodejs_17": "ghcr.io/parkervcp/yolks:nodejs_17",
"ghcr.io/parkervcp/yolks:nodejs_18": "ghcr.io/parkervcp/yolks:nodejs_18"
},
"file_denylist": [],
"startup": "sh .local/lib/code-server-{{VERSION}}/bin/code-server",
"config": {
"files": "{\r\n \".config/code-server/config.yaml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"password\": \"password: {{server.build.env.PASSWORD}}\",\r\n \"bind-addr\": \"bind-addr: 0.0.0.0:{{server.build.default.port}}\"\r\n }\r\n }\r\n}",
"logs": "{}",
"startup": "{\r\n \"done\": \"HTTP server listening on\"\r\n}",
"stop": "^^C"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "apt update\r\napt install -y curl jq\r\n\r\n\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] \u0026\u0026 echo \"amd64\" || echo \"arm64\")\r\nMATCH=linux-${ARCH}\r\n# Create initial directories\r\nmkdir -p /mnt/server\r\ncd /mnt/server\r\n\r\necho ${ARCH}\r\necho ${MATCH}\r\n# Create needed directories\r\nmkdir -p /mnt/server/.local/lib /mnt/server/.local/bin /mnt/server/.config/code-server /mnt/server/projects\r\n\r\n# Change permission of projects directory so it can be accessed by code-server\r\nchmod 777 /mnt/server/projects\r\ntouch \"/mnt/server/projects/PLACE YOUR PROJECTS HERE\"\r\n\r\n# Check for available versions. Defaults to latest if no valid version is found.\r\nLATEST_JSON=$(curl --silent \"https://api.github.com/repos/coder/code-server/releases/latest\")\r\nRELEASES=$(curl --silent \"https://api.github.com/repos/coder/code-server/releases\")\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 ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"v${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"v${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"v${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n# Download the given Version and extract it\r\necho \"Downloading $DOWNLOAD_URL\"\r\ncurl -fL $DOWNLOAD_URL | tar -C /mnt/server/.local/lib -xz\r\nmv /mnt/server/.local/lib/code-server-*linux-${ARCH} /mnt/server/.local/lib/code-server-${VERSION}\r\n\r\n\r\nPATH=\"/mnt/server/.local/bin:$PATH\"\r\necho \"password: changeme\r\nbind-addr: 0.0.0.0\r\nauth: password\r\ncert: false\" \u003e /mnt/server/.config/code-server/config.yaml\r\n\r\necho \"Install complete\""
}
},
"variables": [
{
"name": "Password",
"description": "Password to login to your Code-Server instance",
"env_variable": "PASSWORD",
"default_value": "changeme",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:32",
"field_type": "text"
},
{
"name": "Version",
"description": "Version for (re)installation such as 3.9.3. Defaults to latest version if no valid version is provided",
"env_variable": "VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "string|max:20",
"field_type": "text"
}
]
}
52 changes: 52 additions & 0 deletions elasticsearch/egg-pterodactyl-elasticsearch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-02T14:40:58+00:00",
"name": "Elasticsearch",
"author": "[email protected]",
"description": "Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease.",
"features": null,
"docker_images": {
"ghcr.io/parkervcp/yolks:debian": "ghcr.io/parkervcp/yolks:debian"
},
"file_denylist": [],
"startup": "./bin/elasticsearch -E network.host=0.0.0.0 -E http.port={{SERVER_PORT}} -E discovery.type={{DISCOVERY_SEED_HOSTS}}",
"config": {
"files": "{}",
"logs": "{}",
"startup": "{\r\n \"done\": \"started\"\r\n}",
"stop": "^C"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n# Elasticsearch Installation Script\r\n#\r\n# Server Files: /mnt/server\r\n\r\n## Install Requirements\r\n\r\ncd /mnt/server\r\n\r\n## Install Elasticsearch\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] \u0026\u0026 echo \"x86_64\" || echo \"aarch64\")\r\ncurl -sSL -o elasticsearch.tar.gz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$VERSION-linux-${ARCH}.tar.gz\r\n\r\ntar -zxf elasticsearch.tar.gz --directory /mnt/server\r\nmv elasticsearch*/* /mnt/server\r\nrm elasticsearch.tar.gz\r\nrm -R elasticsearch-*\r\n\r\n## Finish command\r\necho \"All done! Just start it up :)\""
}
},
"variables": [
{
"name": "Discovery Seed Hosts",
"description": "Please keep default if you are unsure.",
"env_variable": "DISCOVERY_SEED_HOSTS",
"default_value": "single-node",
"user_viewable": true,
"user_editable": true,
"rules": "required",
"field_type": "text"
},
{
"name": "Elasticsearch Version",
"description": "Go to https://www.elastic.co/downloads/elasticsearch and look at the version at the top.",
"env_variable": "VERSION",
"default_value": "8.13.0",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
"field_type": "text"
}
]
}
102 changes: 102 additions & 0 deletions foldingathome/egg-pterodactyl-folding--home.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-02T14:40:59+00:00",
"name": "Folding@Home",
"author": "[email protected]",
"description": "Folding@home is a distributed computing project aimed to help scientists develop new therapeutics for a variety of diseases by the means of simulating protein dynamics. This includes the process of protein folding and the movements of proteins, and is reliant on simulations run on volunteers' personal computers",
"features": null,
"docker_images": {
"ghcr.io/parkervcp/yolks:debian": "ghcr.io/parkervcp/yolks:debian"
},
"file_denylist": [],
"startup": "./FAHClient --user={{FAH_USERNAME}} --team={{FAH_TEAM}} --passkey={{FAH_PASSKEY}} $(if {{FAH_ANON}}; then echo \"--fold-anon=true\"; fi) --command-port={{SERVER_PORT}} --password={{FAH_PASSWORD}} --power={{FAH_POWER}}",
"config": {
"files": "{}",
"logs": "{}",
"startup": "{\r\n \"done\": \"Started FahCore\"\r\n}",
"stop": "^^C"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n#\r\n# Folding@Home install script\r\n#\r\n# Created by Fuggschen\r\n\r\nexport DEBIAN_FRONTEND=noninteractive\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] \u0026\u0026 echo \"64bit\" || echo \"arm64\")\r\ncd /tmp\r\n\r\necho \"Removing previous Version\"\r\nmv /mnt/server/config.xml /tmp/config.xml\r\nrm -rf /mnt/server/*\r\n\r\necho \"Installing dependencies\"\r\napt update \u0026\u0026 apt upgrade -y \u0026\u0026 apt install curl bzip2 -y\r\n\r\necho \"Downloading FAHClient\"\r\ncurl -sSL -o fahclient.tar.bz2 https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-${ARCH}/${FAH_VERSION}/latest.tar.bz2\r\n\r\necho \"Installing FAHClient\"\r\ntar -xjf fahclient.tar.bz2 -C /mnt/server --strip-components=1\r\n\r\necho \"Cleaning up..\"\r\nrm -f fahclient.tar.bz2\r\nrm -f /mnt/server/sample-config.xml\r\nmv /tmp/config.xml /mnt/server/config.xml\r\n\r\nFILE=/mnt/server/config.xml\r\nif [[ ! -f $FILE ]]\r\nthen\r\necho \"Setting up config.xml\"\r\ncat \u003e $FILE \u003c\u003c EOF\r\n\u003cconfig\u003e\r\n \u003c!-- Folding Slots --\u003e\r\n \u003cslot id='0' type='CPU'/\u003e\r\n \u003c!-- Maximum CPU Cores to use. Can't be more than 64 --\u003e\r\n \u003ccpus v='64'/\u003e\r\n\u003c/config\u003e\r\nEOF\r\nfi\r\n\r\necho \"Done!\""
}
},
"variables": [
{
"name": "FaH Username",
"description": "Your Folding@Home Username",
"env_variable": "FAH_USERNAME",
"default_value": "Anonymous",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "FaH Team",
"description": "Your Folding@Home Team that you are folding for. For reference look here: https://stats.foldingathome.org/team",
"env_variable": "FAH_TEAM",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|int",
"field_type": "text"
},
{
"name": "FaH Passkey",
"description": "Your Folding@Home Passkey for your Username, if not Anonymous. Get your Passkey here: https://apps.foldingathome.org/getpasskey",
"env_variable": "FAH_PASSKEY",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:32",
"field_type": "text"
},
{
"name": "FaH Anonymous Mode",
"description": "Set to true if you are folding Anonymously",
"env_variable": "FAH_ANON",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "FaH Version",
"description": "Set to wanted major Folding@Home Version. Check here: https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/",
"env_variable": "FAH_VERSION",
"default_value": "v7.6",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "FaHControl Password",
"description": "Set a WebUI Password",
"env_variable": "FAH_PASSWORD",
"default_value": "SetPasswordHere",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:64",
"field_type": "text"
},
{
"name": "FaH Power",
"description": "The Powerlevel it should use:\r\n- light (only half the cpu power is used)\r\n- medium (full cpu power)\r\n- full (full cpu and gpu power but gpu is not supported)",
"env_variable": "FAH_POWER",
"default_value": "medium",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:light,medium,full",
"field_type": "text"
}
]
}
Loading

0 comments on commit 8a27c5f

Please sign in to comment.