Merge pull request #1774 from parkervcp/generic_lang_eggs

Move Generic Language Eggs
This commit is contained in:
Quinten 2022-09-23 19:03:51 +02:00 committed by GitHub
commit efd794e6f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 217 additions and 143 deletions

View File

@ -29,15 +29,9 @@ If you are reading this it looks like you are looking to add an egg to your serv
* [ATL Bot](/bots/discord/atlbot) Node JS * [ATL Bot](/bots/discord/atlbot) Node JS
* [Bastion](/bots/discord/bastion) Node JS * [Bastion](/bots/discord/bastion) Node JS
* [CorpBot](/bots/discord/corpbot) Python * [CorpBot](/bots/discord/corpbot) Python
* [discordgo](bots/discord/discordgo) Golang generic
* [discord.java](bots/discord/discord.java) Java generic
* [discord.js](bots/discord/discord.js) Node JS generic
* [discord.py](bots/discord/discord.py) Python generic
* [discord.rs](bots/discord/discord.rs) Rust generic
* [Dynamica](/bots/discord/dynamica) Node JS * [Dynamica](/bots/discord/dynamica) Node JS
* [fragbot](/bots/discord/fragbot) Golang * [fragbot](/bots/discord/fragbot) Golang
* [JMusicBot](/bots/discord/jmusicbot) Java * [JMusicBot](/bots/discord/jmusicbot) Java
* [nodemon.js](bots/discord/nodemon.js) Nodemon JS generic
* [parkertron](/bots/discord/parkertron) Golang * [parkertron](/bots/discord/parkertron) Golang
* [pixel-bot](/bots/discord/pixelbot) Python * [pixel-bot](/bots/discord/pixelbot) Python
* [Redbot](/bots/discord/redbot) Python * [Redbot](/bots/discord/redbot) Python
@ -56,6 +50,17 @@ If you are reading this it looks like you are looking to add an egg to your serv
* [JTS3ServerMod](/bots/teamspeak3/jts3servermod) * [JTS3ServerMod](/bots/teamspeak3/jts3servermod)
## [Generic Languages](/generic)
* [deno](/generic/deno/)
* [golang](/generic/golang/)
* [java](/generic/java/)
* [lua](/generic/lua/)
* [nodejs](/generic/nodejs/)
* [nodemon](/generic/nodemon/)
* [python](/generic/python/)
* [rust](/generic/rust/)
## [Database](/database) ## [Database](/database)
### In-Memory Databases ### In-Memory Databases

View File

@ -17,21 +17,6 @@ Give awesome perks to your Discord server!
[corpnewt/CorpBot.py](https://github.com/corpnewt/CorpBot.py) [corpnewt/CorpBot.py](https://github.com/corpnewt/CorpBot.py)
A very clumsy python bot for discord A very clumsy python bot for discord
### [DiscordJS](discord.js)
[discord.js](https://discord.js.org/)
A generic discord.js egg for running discord bots.
### [DiscordPY](discord.py)
[discord.py](https://discordpy.readthedocs.io/en/latest/)
A generic discord.py egg for running discord bots.
### [discordgo](discordgo)
[discordgo](https://github.com/bwmarrin/discordgo)
A generic go application egg.
### [FragBot](fragbot) ### [FragBot](fragbot)
[fragforce/fragbot](https://github.com/fragforce/fragbot) [fragforce/fragbot](https://github.com/fragforce/fragbot)
@ -42,11 +27,6 @@ The bot that runs as the fragforce `@Fragbot` offering looking-for-group service
[jagrosh/MusicBot](https://github.com/jagrosh/MusicBot) [jagrosh/MusicBot](https://github.com/jagrosh/MusicBot)
A Discord music bot that's easy to set up and run yourself! A Discord music bot that's easy to set up and run yourself!
### [nodemon](nodemon.js)
[nodemon](https://nodemon.io/)
A nodemon javascript egg for running and automatically restarting the node application when file changes in the directory are detected
### [parkertron](parkertron) ### [parkertron](parkertron)
[parkervcp/parkertron](https://github.com/parkervcp/parkertron) [parkervcp/parkertron](https://github.com/parkervcp/parkertron)

View File

@ -1,3 +0,0 @@
# discord.rs generic
This egg is designed to run any generic Rust application with cargo, allowing users to pull their own Rust discord bot from a GitHub repository.

View File

@ -1,7 +0,0 @@
# luvit generic
This egg was designed to allow a user to pull their own lua discord bot from a repo and run it with luvit.
There is an option to allow a user to upload their own files to run a bot.
The startup configs and commands may need changing to actually function properly.

41
generic/README.md Normal file
View File

@ -0,0 +1,41 @@
# Generic Language
### [Deno](deno)
[deno](https://deno.land/)
A generic deno egg
### [Golang](golang)
[golang](https://go.dev/)
A generic go egg
### [Java](java)
[java](https://www.java.com/en/)
A generic java egg
### [Lua](lua)
[lua](https://www.lua.org/)
A generic luvit/lua egg
### [Node JS](nodejs)
[nodejs](https://nodejs.org)
A generic node.js egg
### [nodemon](nodemon)
[nodemon](https://nodemon.io/)
A nodemon javascript egg for running and automatically restarting the node application when file changes in the directory are detected
### [Python](python)
[python](https://www.python.org/)
A generic python egg
### [Rust](python)
[rust](https://www.rust-lang.org/)
A generic rust egg

View File

@ -1,17 +1,22 @@
{ {
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": { "meta": {
"version": "PTDL_v1" "version": "PTDL_v2",
"update_url": null
}, },
"exported_at": "2020-10-11T12:12:50-04:00", "exported_at": "2022-07-25T14:20:37-04:00",
"name": "discordgo generic", "name": "golang generic",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "A generic golang egg.\r\n\r\nMeant to be customized before it is used.", "description": "A generic golang egg that compiles the application and saves an executable\r\n\r\nMeant to be customized before it is used.",
"image": "quay.io\/parkervcp\/pterodactyl-images:base_debian", "features": null,
"docker_images": {
"ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": ".\/${EXECUTABLE}", "startup": ".\/${EXECUTABLE}",
"config": { "config": {
"files": "{}", "files": "{}",
"startup": "{}", "startup": "{\r\n \"done\": \"change this part\"\r\n}",,
"logs": "{}", "logs": "{}",
"stop": "^C" "stop": "^C"
}, },
@ -28,18 +33,20 @@
"description": "Go package to get and build", "description": "Go package to get and build",
"env_variable": "GO_PACKAGE", "env_variable": "GO_PACKAGE",
"default_value": "", "default_value": "",
"user_viewable": 1, "user_viewable": true,
"user_editable": 1, "user_editable": true,
"rules": "required|string" "rules": "required|string",
"field_type": "text"
}, },
{ {
"name": "Executable", "name": "Executable",
"description": "This is the executable from the bot build.", "description": "This is the executable from the build.",
"env_variable": "EXECUTABLE", "env_variable": "EXECUTABLE",
"default_value": "", "default_value": "",
"user_viewable": 1, "user_viewable": true,
"user_editable": 0, "user_editable": false,
"rules": "required|string" "rules": "required|string",
"field_type": "text"
} }
] ]
} }

View File

@ -1,20 +1,19 @@
{ {
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": { "meta": {
"version": "PTDL_v2", "version": "PTDL_v1",
"update_url": null "update_url": null
}, },
"exported_at": "2022-09-10T00:03:57+02:00", "exported_at": "2021-07-21T18:23:17+03:00",
"name": "Discord Java", "name": "Generic Java",
"author": "sneaky@sneakyhub.com", "author": "sneaky@sneakyhub.com",
"description": "Creates a container that runs java.", "description": "Creates a container that runs java.",
"features": null, "features": null,
"docker_images": { "images": [
"ghcr.io\/parkervcp\/yolks:java_8": "ghcr.io\/parkervcp\/yolks:java_8", "ghcr.io\/parkervcp\/yolks:java_8",
"ghcr.io\/parkervcp\/yolks:java_11": "ghcr.io\/parkervcp\/yolks:java_11", "ghcr.io\/parkervcp\/yolks:java_11",
"ghcr.io\/parkervcp\/yolks:java_16": "ghcr.io\/parkervcp\/yolks:java_16", "ghcr.io\/parkervcp\/yolks:java_16"
"ghcr.io\/parkervcp\/yolks:java_17": "ghcr.io\/parkervcp\/yolks:java_17" ],
},
"file_denylist": [], "file_denylist": [],
"startup": "java -Dterminal.jline=false -Dterminal.ansi=true -jar {{JARFILE}}", "startup": "java -Dterminal.jline=false -Dterminal.ansi=true -jar {{JARFILE}}",
"config": { "config": {
@ -38,8 +37,7 @@
"default_value": "sneakyhub.jar", "default_value": "sneakyhub.jar",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string|max:20", "rules": "required|string|max:20"
"field_type": "text"
} }
] ]
} }

View File

@ -0,0 +1,22 @@
# luvit generic
This egg was designed to allow a user to pull their own lua code from a repo and run it with luvit.
There is an option to allow a user to upload their own files to run an app.
The startup configs and commands may need changing to actually function properly.
## Configuration
The server will be stuck as `starting` until the egg Start Configuration is modified. You have to edit the text to match something your bot will print for Pterodactyl panel to detect it as running.
![image](https://user-images.githubusercontent.com/10975908/126516861-c5cb4630-9f25-405c-8199-97bf5ec15a7f.png)
You can use arrays to have multiple different values when different bots are being used
```json
{
"done":[
"change this text 1",
"change this text 2"
]
}

View File

@ -7,7 +7,7 @@
"exported_at": "2022-01-22T05:40:57-05:00", "exported_at": "2022-01-22T05:40:57-05:00",
"name": "luvit generic", "name": "luvit generic",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "A generic luvit egg This will clone a git repo for a bot. It defaults to master if no branch is specified.\r\n\r\nSupports the discordia lua framework.", "description": "A generic luvit egg This will clone a git repo. It defaults to master if no branch is specified.\r\n\r\nSupports the discordia lua framework.",
"features": null, "features": null,
"images": [ "images": [
"ghcr.io\/parkervcp\/yolks:debian" "ghcr.io\/parkervcp\/yolks:debian"
@ -22,7 +22,7 @@
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#!\/bin\/bash\r\n## luvit generic install script\r\n\r\napt update\r\napt install -y git curl jq file unzip\r\n\r\n## get git files\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n echo -e \"assuming user knows what they are doing have a good day.\"\r\n exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git js bot repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\nfi\r\n\r\n## install luvit for install time\r\ncurl -L https:\/\/github.com\/luvit\/lit\/raw\/master\/get-lit.sh | sh\r\n\r\n## Install luvit packages\r\n.\/lit install ${LIT_PACKAGES}", "script": "#!\/bin\/bash\r\n## luvit generic install script\r\n\r\napt update\r\napt install -y git curl jq file unzip\r\n\r\n## get git files\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n echo -e \"assuming user knows what they are doing have a good day.\"\r\n exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\nfi\r\n\r\n## install luvit for install time\r\ncurl -L https:\/\/github.com\/luvit\/lit\/raw\/master\/get-lit.sh | sh\r\n\r\n## Install luvit packages\r\n.\/lit install ${LIT_PACKAGES}",
"container": "debian:buster-slim", "container": "debian:buster-slim",
"entrypoint": "bash" "entrypoint": "bash"
} }
@ -74,10 +74,10 @@
"rules": "nullable|string" "rules": "nullable|string"
}, },
{ {
"name": "Bot lua file", "name": "lua file",
"description": "The Lua file to run", "description": "The Lua file to run",
"env_variable": "LUA_FILE", "env_variable": "LUA_FILE",
"default_value": "bot.lua", "default_value": "app.lua",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string" "rules": "required|string"

View File

@ -1,24 +1,23 @@
{ {
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": { "meta": {
"version": "PTDL_v1", "version": "PTDL_v2",
"update_url": null "update_url": null
}, },
"exported_at": "2021-10-22T07:43:48-04:00", "exported_at": "2022-07-25T14:13:08-04:00",
"name": "discord.js generic", "name": "node.js generic",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "a generic discord js bot egg\r\n\r\nThis will clone a git repo for a bot. it defaults to master if no branch is specified.\r\n\r\nInstalls the node_modules on install. If you set user_upload then I assume you know what you are doing.", "description": "a generic node.js egg\r\n\r\nThis will clone a git repo. it defaults to master if no branch is specified.\r\n\r\nInstalls the node_modules on install. If you set user_upload then I assume you know what you are doing.",
"features": null, "features": null,
"images": [ "docker_images": {
"ghcr.io\/parkervcp\/yolks:nodejs_18", "ghcr.io\/parkervcp\/yolks:nodejs_17": "ghcr.io\/parkervcp\/yolks:nodejs_17",
"ghcr.io\/parkervcp\/yolks:nodejs_17", "ghcr.io\/parkervcp\/yolks:nodejs_16": "ghcr.io\/parkervcp\/yolks:nodejs_16",
"ghcr.io\/parkervcp\/yolks:nodejs_16", "ghcr.io\/parkervcp\/yolks:nodejs_15": "ghcr.io\/parkervcp\/yolks:nodejs_15",
"ghcr.io\/parkervcp\/yolks:nodejs_15", "ghcr.io\/parkervcp\/yolks:nodejs_14": "ghcr.io\/parkervcp\/yolks:nodejs_14",
"ghcr.io\/parkervcp\/yolks:nodejs_14", "ghcr.io\/parkervcp\/yolks:nodejs_12": "ghcr.io\/parkervcp\/yolks:nodejs_12"
"ghcr.io\/parkervcp\/yolks:nodejs_12" },
],
"file_denylist": [], "file_denylist": [],
"startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then \/usr\/local\/bin\/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then \/usr\/local\/bin\/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f \/home\/container\/package.json ]; then \/usr\/local\/bin\/npm install; fi; \/usr\/local\/bin\/node \/home\/container\/{{BOT_JS_FILE}}", "startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then \/usr\/local\/bin\/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then \/usr\/local\/bin\/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f \/home\/container\/package.json ]; then \/usr\/local\/bin\/npm install; fi; \/usr\/local\/bin\/node \/home\/container\/{{JS_FILE}}",
"config": { "config": {
"files": "{}", "files": "{}",
"startup": "{\r\n \"done\": \"change this part\"\r\n}", "startup": "{\r\n \"done\": \"change this part\"\r\n}",
@ -27,7 +26,7 @@
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#!\/bin\/bash\r\n# NodeJS Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git curl jq file unzip make gcc g++ python python-dev libtool\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n echo -e \"assuming user knows what they are doing have a good day.\"\r\n exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git js bot repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\n\r\nfi\r\n\r\necho \"Installing nodejs packages\"\r\nif [[ ! -z ${NODE_PACKAGES} ]]; then\r\n \/usr\/local\/bin\/npm install ${NODE_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/package.json ]; then\r\n \/usr\/local\/bin\/npm install --production\r\nfi\r\n\r\necho -e \"install complete\"\r\nexit 0", "script": "#!\/bin\/bash\r\n# NodeJS App Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git curl jq file unzip make gcc g++ python python-dev libtool\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n echo -e \"assuming user knows what they are doing have a good day.\"\r\n exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git js repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\n\r\nfi\r\n\r\necho \"Installing nodejs packages\"\r\nif [[ ! -z ${NODE_PACKAGES} ]]; then\r\n \/usr\/local\/bin\/npm install ${NODE_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/package.json ]; then\r\n \/usr\/local\/bin\/npm install --production\r\nfi\r\n\r\necho -e \"install complete\"\r\nexit 0",
"container": "node:14-buster-slim", "container": "node:14-buster-slim",
"entrypoint": "bash" "entrypoint": "bash"
} }
@ -40,16 +39,18 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Install Branch", "name": "Install Branch",
"description": "The branch of the bot to install.", "description": "The branch to install.",
"env_variable": "BRANCH", "env_variable": "BRANCH",
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "User Uploaded Files", "name": "User Uploaded Files",
@ -58,7 +59,8 @@
"default_value": "0", "default_value": "0",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|boolean" "rules": "required|boolean",
"field_type": "text"
}, },
{ {
"name": "Auto Update", "name": "Auto Update",
@ -67,16 +69,18 @@
"default_value": "0", "default_value": "0",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|boolean" "rules": "required|boolean",
"field_type": "text"
}, },
{ {
"name": "Bot js file", "name": "JS file",
"description": "The file that starts the bot.", "description": "The file that starts the app",
"env_variable": "BOT_JS_FILE", "env_variable": "JS_FILE",
"default_value": "index.js", "default_value": "index.js",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string" "rules": "required|string",
"field_type": "text"
}, },
{ {
"name": "Additional Node packages", "name": "Additional Node packages",
@ -85,7 +89,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Username", "name": "Git Username",
@ -94,7 +99,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Access Token", "name": "Git Access Token",
@ -103,7 +109,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Uninstall Node packages", "name": "Uninstall Node packages",
@ -112,7 +119,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
} }
] ]
} }

View File

@ -1,23 +1,23 @@
{ {
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": { "meta": {
"version": "PTDL_v1", "version": "PTDL_v2",
"update_url": null "update_url": null
}, },
"exported_at": "2021-10-19T13:22:35-04:00", "exported_at": "2022-07-25T14:17:50-04:00",
"name": "discord.py generic", "name": "python generic",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "A Discord bot written in Python using discord.py\r\n\r\nhttps:\/\/github.com\/Ispira\/pixel-bot", "description": "A Generic Python Egg for Pterodactyl\r\n\r\nTested with: https:\/\/github.com\/Ispira\/pixel-bot",
"features": null, "features": null,
"images": [ "docker_images": {
"ghcr.io\/parkervcp\/yolks:python_3.10", "ghcr.io\/parkervcp\/yolks:python_3.10": "ghcr.io\/parkervcp\/yolks:python_3.10",
"ghcr.io\/parkervcp\/yolks:python_3.9", "ghcr.io\/parkervcp\/yolks:python_3.9": "ghcr.io\/parkervcp\/yolks:python_3.9",
"ghcr.io\/parkervcp\/yolks:python_3.8", "ghcr.io\/parkervcp\/yolks:python_3.8": "ghcr.io\/parkervcp\/yolks:python_3.8",
"ghcr.io\/parkervcp\/yolks:python_3.7", "ghcr.io\/parkervcp\/yolks:python_3.7": "ghcr.io\/parkervcp\/yolks:python_3.7",
"ghcr.io\/parkervcp\/yolks:python_2.7" "ghcr.io\/parkervcp\/yolks:python_2.7": "ghcr.io\/parkervcp\/yolks:python_2.7"
], },
"file_denylist": [], "file_denylist": [],
"startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [[ ! -z {{PY_PACKAGES}} ]]; then pip install -U --prefix .local {{PY_PACKAGES}}; fi; if [[ -f \/home\/container\/${REQUIREMENTS_FILE} ]]; then pip install -U --prefix .local -r ${REQUIREMENTS_FILE}; fi; \/usr\/local\/bin\/python \/home\/container\/{{BOT_PY_FILE}}", "startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [[ ! -z {{PY_PACKAGES}} ]]; then pip install -U --prefix .local {{PY_PACKAGES}}; fi; if [[ -f \/home\/container\/${REQUIREMENTS_FILE} ]]; then pip install -U --prefix .local -r ${REQUIREMENTS_FILE}; fi; \/usr\/local\/bin\/python \/home\/container\/{{PY_FILE}}",
"config": { "config": {
"files": "{}", "files": "{}",
"startup": "{\r\n \"done\": \"change this part\"\r\n}", "startup": "{\r\n \"done\": \"change this part\"\r\n}",
@ -26,7 +26,7 @@
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#!\/bin\/bash\r\n# Python Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git curl jq file unzip make gcc g++ python python-dev libtool\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n echo -e \"assuming user knows what they are doing have a good day.\"\r\n exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git js bot repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\n\r\nfi\r\n\r\nexport HOME=\/mnt\/server\r\n\r\necho \"Installing python requirements into folder\"\r\nif [[ ! -z ${PY_PACKAGES} ]]; then\r\n pip install -U --prefix .local ${PY_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/requirements.txt ]; then\r\n pip install -U --prefix .local -r ${REQUIREMENTS_FILE}\r\nfi\r\n\r\necho -e \"install complete\"\r\nexit 0", "script": "#!\/bin\/bash\r\n# Python App Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git curl jq file unzip make gcc g++ python python-dev libtool\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n echo -e \"assuming user knows what they are doing have a good day.\"\r\n exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git python repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\n\r\nfi\r\n\r\nexport HOME=\/mnt\/server\r\n\r\necho \"Installing python requirements into folder\"\r\nif [[ ! -z ${PY_PACKAGES} ]]; then\r\n pip install -U --prefix .local ${PY_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/requirements.txt ]; then\r\n pip install -U --prefix .local -r ${REQUIREMENTS_FILE}\r\nfi\r\n\r\necho -e \"install complete\"\r\nexit 0",
"container": "python:3.8-slim", "container": "python:3.8-slim",
"entrypoint": "bash" "entrypoint": "bash"
} }
@ -39,7 +39,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Branch", "name": "Git Branch",
@ -48,7 +49,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "User Uploaded Files", "name": "User Uploaded Files",
@ -57,7 +59,8 @@
"default_value": "0", "default_value": "0",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|boolean" "rules": "required|boolean",
"field_type": "text"
}, },
{ {
"name": "Auto Update", "name": "Auto Update",
@ -66,16 +69,18 @@
"default_value": "0", "default_value": "0",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|boolean" "rules": "required|boolean",
"field_type": "text"
}, },
{ {
"name": "Bot py file", "name": "App py file",
"description": "The file that starts the bot.", "description": "The file that starts the App.",
"env_variable": "BOT_PY_FILE", "env_variable": "PY_FILE",
"default_value": "bot.py", "default_value": "app.py",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string" "rules": "required|string",
"field_type": "text"
}, },
{ {
"name": "Additional Python packages", "name": "Additional Python packages",
@ -84,7 +89,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Username", "name": "Git Username",
@ -93,7 +99,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Access Token", "name": "Git Access Token",
@ -102,7 +109,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Requirements file", "name": "Requirements file",
@ -111,7 +119,8 @@
"default_value": "requirements.txt", "default_value": "requirements.txt",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string" "rules": "required|string",
"field_type": "text"
} }
] ]
} }

18
generic/rust/README.md Normal file
View File

@ -0,0 +1,18 @@
# rust generic
This egg is designed to run any generic Rust application with cargo, allowing users to pull their own Rust discord bot from a GitHub repository.
## Configuration
The server will be stuck as `starting` until the egg Start Configuration is modified. You have to edit the text to match something your bot will print for Pterodactyl panel to detect it as running.
![image](https://user-images.githubusercontent.com/10975908/126516861-c5cb4630-9f25-405c-8199-97bf5ec15a7f.png)
You can use arrays to have multiple different values when different bots are being used
```json
{
"done":[
"change this text 1",
"change this text 2"
]
}

View File

@ -1,20 +1,20 @@
{ {
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": { "meta": {
"version": "PTDL_v1", "version": "PTDL_v2",
"update_url": null "update_url": null
}, },
"exported_at": "2022-04-17T16:56:51+01:00", "exported_at": "2022-07-25T14:36:57-04:00",
"name": "discord.rs generic", "name": "rust generic",
"author": "ethan.coward@icloud.com", "author": "ethan.coward@icloud.com",
"description": "Creates a container that runs rust with cargo.", "description": "Creates a container that runs rust with cargo.",
"features": null, "features": null,
"images": [ "docker_images": {
"ghcr.io\/parkervcp\/yolks:rust_1.31", "ghcr.io\/parkervcp\/yolks:rust_1.31": "ghcr.io\/parkervcp\/yolks:rust_1.31",
"ghcr.io\/parkervcp\/yolks:rust_1.56", "ghcr.io\/parkervcp\/yolks:rust_1.56": "ghcr.io\/parkervcp\/yolks:rust_1.56",
"ghcr.io\/parkervcp\/yolks:rust_1.60", "ghcr.io\/parkervcp\/yolks:rust_1.60": "ghcr.io\/parkervcp\/yolks:rust_1.60",
"ghcr.io\/parkervcp\/yolks:rust_latest" "ghcr.io\/parkervcp\/yolks:rust_latest": "ghcr.io\/parkervcp\/yolks:rust_latest"
], },
"file_denylist": [], "file_denylist": [],
"startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; cargo run --release", "startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; cargo run --release",
"config": { "config": {
@ -38,7 +38,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Branch", "name": "Git Branch",
@ -47,7 +48,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Auto Update", "name": "Auto Update",
@ -56,7 +58,8 @@
"default_value": "0", "default_value": "0",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|boolean" "rules": "required|boolean",
"field_type": "text"
}, },
{ {
"name": "Git Username", "name": "Git Username",
@ -65,7 +68,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
"field_type": "text"
}, },
{ {
"name": "Git Access Token", "name": "Git Access Token",
@ -74,16 +78,8 @@
"default_value": "", "default_value": "",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string" "rules": "nullable|string",
}, "field_type": "text"
{
"name": "Bot Token",
"description": "The discord token used to run your bot. Sets to the environment variable `DISCORD_TOKEN`\r\n\r\nAlternatively, you can use a .env file",
"env_variable": "DISCORD_TOKEN",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string"
} }
] ]
} }