From 8f9d962d63e28999e005bca358c20583127c049f Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Wed, 6 Jan 2021 12:51:53 +0100 Subject: [PATCH 1/7] The default installation with some minor adjustments --- software/code-server/README.md | 13 +++++++ software/code-server/egg-code--server.json | 40 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 software/code-server/README.md create mode 100644 software/code-server/egg-code--server.json diff --git a/software/code-server/README.md b/software/code-server/README.md new file mode 100644 index 00000000..f1863224 --- /dev/null +++ b/software/code-server/README.md @@ -0,0 +1,13 @@ +# Code-Server + +### From the [Code-Server](https://github.com/cdr/code-server) GitHub + +Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. + +### Server Ports + +Ports required to run the server in a table format. + +| Port | default | +| ---- | ------- | +| Game | 8080 | diff --git a/software/code-server/egg-code--server.json b/software/code-server/egg-code--server.json new file mode 100644 index 00000000..4888798b --- /dev/null +++ b/software/code-server/egg-code--server.json @@ -0,0 +1,40 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v1", + "update_url": null + }, + "exported_at": "2021-01-06T12:50:49+01:00", + "name": "Code-Server", + "author": "admin@altvserver.de", + "description": "Run VS Code on any machine anywhere and access it in the browser.", + "features": null, + "images": [ + "quay.io\/parkervcp\/pterodactyl-images:debian_nodejs-14" + ], + "startup": "sh .\/.local\/lib\/code-server-3.8.0\/code-server --config cfg.yaml --bind-addr 0.0.0.0:{{SERVER_PORT}}", + "config": { + "files": "{\r\n \"cfg.yaml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"auth\": \"password\",\r\n \"password\": \"{{server.build.env.PASSWORD}}\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": \"info HTTP server listening on\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "apt update\r\napt install curl sudo -y\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nmkdir -p \/mnt\/server\/.local\/lib \/mnt\/server\/.local\/bin\r\ncurl -fL https:\/\/github.com\/cdr\/code-server\/releases\/download\/v3.8.0\/code-server-3.8.0-linux-amd64.tar.gz \\\r\n | tar -C \/mnt\/server\/.local\/lib -xz\r\nmv \/mnt\/server\/.local\/lib\/code-server-3.8.0-linux-amd64 \/mnt\/server\/.local\/lib\/code-server-3.8.0\r\nrm \/mnt\/server\/.local\/bin\/code-server\r\nln -s \/mnt\/server\/.local\/lib\/code-server-3.8.0\/bin\/code-server \/mnt\/server\/.local\/bin\/code-server\r\nPATH=\"\/mnt\/server\/.local\/bin:$PATH\"", + "container": "debian:buster-slim", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Password", + "description": "Passwort to login to your VSCode instance", + "env_variable": "PASSWORD", + "default_value": "changeme", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:32" + } + ] +} \ No newline at end of file From 972182fabce76a352805fe0d5a433984b8bb7ebd Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Sat, 9 Jan 2021 08:49:24 +0100 Subject: [PATCH 2/7] - Added IP Option (defaults to 0.0.0.09 - Reverted back to original config file - Changed startup command --- software/code-server/egg-code--server.json | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/software/code-server/egg-code--server.json b/software/code-server/egg-code--server.json index 4888798b..87ecc602 100644 --- a/software/code-server/egg-code--server.json +++ b/software/code-server/egg-code--server.json @@ -4,7 +4,7 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-01-06T12:50:49+01:00", + "exported_at": "2021-01-09T08:45:52+01:00", "name": "Code-Server", "author": "admin@altvserver.de", "description": "Run VS Code on any machine anywhere and access it in the browser.", @@ -12,16 +12,16 @@ "images": [ "quay.io\/parkervcp\/pterodactyl-images:debian_nodejs-14" ], - "startup": "sh .\/.local\/lib\/code-server-3.8.0\/code-server --config cfg.yaml --bind-addr 0.0.0.0:{{SERVER_PORT}}", + "startup": "sh .local\/lib\/code-server-3.8.0\/bin\/code-server --bind-addr {{IP}}:{{SERVER_PORT}}", "config": { - "files": "{\r\n \"cfg.yaml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"auth\": \"password\",\r\n \"password\": \"{{server.build.env.PASSWORD}}\"\r\n }\r\n }\r\n}", + "files": "{\r\n \".config\/code-server\/config.yaml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"password\": \"{{server.build.env.PASSWORD}}\",\r\n \"bind\": \"{{server.build.env.IP}}:{{server.build.default.port}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"info HTTP server listening on\"\r\n}", "logs": "{}", "stop": "^C" }, "scripts": { "installation": { - "script": "apt update\r\napt install curl sudo -y\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nmkdir -p \/mnt\/server\/.local\/lib \/mnt\/server\/.local\/bin\r\ncurl -fL https:\/\/github.com\/cdr\/code-server\/releases\/download\/v3.8.0\/code-server-3.8.0-linux-amd64.tar.gz \\\r\n | tar -C \/mnt\/server\/.local\/lib -xz\r\nmv \/mnt\/server\/.local\/lib\/code-server-3.8.0-linux-amd64 \/mnt\/server\/.local\/lib\/code-server-3.8.0\r\nrm \/mnt\/server\/.local\/bin\/code-server\r\nln -s \/mnt\/server\/.local\/lib\/code-server-3.8.0\/bin\/code-server \/mnt\/server\/.local\/bin\/code-server\r\nPATH=\"\/mnt\/server\/.local\/bin:$PATH\"", + "script": "apt update\r\napt install curl sudo -y\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nmkdir -p \/mnt\/server\/.local\/lib \/mnt\/server\/.local\/bin \/mnt\/server\/.config\r\ncurl -fL https:\/\/github.com\/cdr\/code-server\/releases\/download\/v3.8.0\/code-server-3.8.0-linux-amd64.tar.gz \\\r\n | tar -C \/mnt\/server\/.local\/lib -xz\r\nmv \/mnt\/server\/.local\/lib\/code-server-3.8.0-linux-amd64 \/mnt\/server\/.local\/lib\/code-server-3.8.0\r\nPATH=\"\/mnt\/server\/.local\/bin:$PATH\"", "container": "debian:buster-slim", "entrypoint": "bash" } @@ -29,12 +29,21 @@ "variables": [ { "name": "Password", - "description": "Passwort to login to your VSCode instance", + "description": "Passwort to login to your Code-Server instance", "env_variable": "PASSWORD", "default_value": "changeme", "user_viewable": true, "user_editable": true, "rules": "required|string|max:32" + }, + { + "name": "IP", + "description": "IP where the interface can be accessed", + "env_variable": "IP", + "default_value": "0.0.0.0", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:15" } ] } \ No newline at end of file From 28454502efc838e43767231106ba20b62592be69 Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Sat, 9 Jan 2021 09:11:44 +0100 Subject: [PATCH 3/7] Added code-server with new category --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 8853b88d..91d97030 100644 --- a/README.md +++ b/README.md @@ -199,3 +199,8 @@ If you are reading this it looks like you are looking to add an egg to your serv ## [Storage](/storage/) ### S3 Storage * [minio](/storage/minio) + +## [Software](/software/) +### Code Server + +- [Code-Server](/software/code-server) From 163acfc2cca854a13e262971b53c20fb51b6fe7d Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Sat, 9 Jan 2021 09:13:14 +0100 Subject: [PATCH 4/7] * Changed parsing from yaml to file * Removed startup parameter, due config fix --- software/code-server/egg-code--server.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/code-server/egg-code--server.json b/software/code-server/egg-code--server.json index 87ecc602..41752940 100644 --- a/software/code-server/egg-code--server.json +++ b/software/code-server/egg-code--server.json @@ -4,7 +4,7 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-01-09T08:45:52+01:00", + "exported_at": "2021-01-09T09:08:57+01:00", "name": "Code-Server", "author": "admin@altvserver.de", "description": "Run VS Code on any machine anywhere and access it in the browser.", @@ -14,7 +14,7 @@ ], "startup": "sh .local\/lib\/code-server-3.8.0\/bin\/code-server --bind-addr {{IP}}:{{SERVER_PORT}}", "config": { - "files": "{\r\n \".config\/code-server\/config.yaml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"password\": \"{{server.build.env.PASSWORD}}\",\r\n \"bind\": \"{{server.build.env.IP}}:{{server.build.default.port}}\"\r\n }\r\n }\r\n}", + "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: {{server.build.env.IP}}:{{server.build.default.port}}\",\r\n \"auth\": \"auth: password\",\r\n \"cert\": \"cert: false\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"info HTTP server listening on\"\r\n}", "logs": "{}", "stop": "^C" From 54e49e069fe205e8fd87def1f9285ee093a03ef9 Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Sun, 10 Jan 2021 10:38:36 +0100 Subject: [PATCH 5/7] Changed mail address --- software/code-server/egg-code--server.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/code-server/egg-code--server.json b/software/code-server/egg-code--server.json index 41752940..eabade55 100644 --- a/software/code-server/egg-code--server.json +++ b/software/code-server/egg-code--server.json @@ -6,7 +6,7 @@ }, "exported_at": "2021-01-09T09:08:57+01:00", "name": "Code-Server", - "author": "admin@altvserver.de", + "author": "mario.franze@gmail.com", "description": "Run VS Code on any machine anywhere and access it in the browser.", "features": null, "images": [ From e5394a611a91a1c4071f811cfb6b413dbaa580b1 Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Wed, 27 Jan 2021 07:28:29 +0100 Subject: [PATCH 6/7] Removed --bind-addr in startup command Added some comments in install script Added var VERSION to choose which version will be installed Fixed install logic --- software/code-server/egg-code--server.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/software/code-server/egg-code--server.json b/software/code-server/egg-code--server.json index eabade55..ad47190b 100644 --- a/software/code-server/egg-code--server.json +++ b/software/code-server/egg-code--server.json @@ -4,7 +4,7 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-01-09T09:08:57+01:00", + "exported_at": "2021-01-27T07:26:08+01:00", "name": "Code-Server", "author": "mario.franze@gmail.com", "description": "Run VS Code on any machine anywhere and access it in the browser.", @@ -12,16 +12,16 @@ "images": [ "quay.io\/parkervcp\/pterodactyl-images:debian_nodejs-14" ], - "startup": "sh .local\/lib\/code-server-3.8.0\/bin\/code-server --bind-addr {{IP}}:{{SERVER_PORT}}", + "startup": "sh .local\/lib\/code-server-3.8.0\/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: {{server.build.env.IP}}:{{server.build.default.port}}\",\r\n \"auth\": \"auth: password\",\r\n \"cert\": \"cert: false\"\r\n }\r\n }\r\n}", + "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}", "startup": "{\r\n \"done\": \"info HTTP server listening on\"\r\n}", "logs": "{}", "stop": "^C" }, "scripts": { "installation": { - "script": "apt update\r\napt install curl sudo -y\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nmkdir -p \/mnt\/server\/.local\/lib \/mnt\/server\/.local\/bin \/mnt\/server\/.config\r\ncurl -fL https:\/\/github.com\/cdr\/code-server\/releases\/download\/v3.8.0\/code-server-3.8.0-linux-amd64.tar.gz \\\r\n | tar -C \/mnt\/server\/.local\/lib -xz\r\nmv \/mnt\/server\/.local\/lib\/code-server-3.8.0-linux-amd64 \/mnt\/server\/.local\/lib\/code-server-3.8.0\r\nPATH=\"\/mnt\/server\/.local\/bin:$PATH\"", + "script": "apt update\r\napt install curl -y\r\n\r\n# Create initial directories\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\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# Download the given Version and extract it\r\ncurl -fL https:\/\/github.com\/cdr\/code-server\/releases\/download\/v${VERSION}\/code-server-${VERSION}-linux-amd64.tar.gz \\\r\n | tar -C \/mnt\/server\/.local\/lib -xz\r\nmv \/mnt\/server\/.local\/lib\/code-server-${VERSION}-linux-amd64 \/mnt\/server\/.local\/lib\/code-server-${VERSION}\r\nPATH=\"\/mnt\/server\/.local\/bin:$PATH\"\r\necho \"password: changeme\r\nbind-addr: 0.0.0.0\r\nauth: password\r\ncert: false\" > \/mnt\/server\/.config\/code-server\/config.yaml", "container": "debian:buster-slim", "entrypoint": "bash" } @@ -37,13 +37,13 @@ "rules": "required|string|max:32" }, { - "name": "IP", - "description": "IP where the interface can be accessed", - "env_variable": "IP", - "default_value": "0.0.0.0", + "name": "Version", + "description": "Version for (re)installation", + "env_variable": "VERSION", + "default_value": "", "user_viewable": true, - "user_editable": false, - "rules": "required|string|max:15" + "user_editable": true, + "rules": "required|string|max:20" } ] } \ No newline at end of file From 26d6b63851bbf6e46e0ca74be655077a7241f99a Mon Sep 17 00:00:00 2001 From: Mario Franze Date: Sun, 21 Feb 2021 03:57:25 +0100 Subject: [PATCH 7/7] Fix: Startup hardcoded startup version --- software/code-server/egg-code--server.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/code-server/egg-code--server.json b/software/code-server/egg-code--server.json index ad47190b..f9d01f4a 100644 --- a/software/code-server/egg-code--server.json +++ b/software/code-server/egg-code--server.json @@ -12,7 +12,7 @@ "images": [ "quay.io\/parkervcp\/pterodactyl-images:debian_nodejs-14" ], - "startup": "sh .local\/lib\/code-server-3.8.0\/bin\/code-server", + "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}", "startup": "{\r\n \"done\": \"info HTTP server listening on\"\r\n}",