From a123f695e0d85cf5ac78e22c9683318eea06b194 Mon Sep 17 00:00:00 2001 From: Dominika Jadowska Date: Fri, 11 Dec 2020 16:05:21 +0100 Subject: [PATCH] Added customization guides --- .vuepress/config.js | 8 ++++++ community/customization/panel.md | 32 ++++++++++++++++++++++++ community/customization/wings.md | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 community/customization/panel.md create mode 100644 community/customization/wings.md diff --git a/.vuepress/config.js b/.vuepress/config.js index ed7e8e78..9c798aed 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -118,6 +118,14 @@ module.exports = { '/community/tutorials/artisan.md', ], }, + { + title: 'Customization', + collapsable: false, + children: [ + '/community/customization/panel.md', + '/community/customization/wings.md', + ], + }, ], '/': [ { diff --git a/community/customization/panel.md b/community/customization/panel.md new file mode 100644 index 00000000..c04c8056 --- /dev/null +++ b/community/customization/panel.md @@ -0,0 +1,32 @@ +# Panel +The official [BUILDING.md](https://github.com/pterodactyl/panel/blob/develop/BUILDING.md) +# Rebuild panel assets +## Install Dependencies +The following commands will install the necessary dependencies for building your panel. +### Install NodeJS +::: tip +You may have to add sudo to the following commands if you are not root. +::: +```bash +# Ubuntu/Debian +curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - +apt install -y nodejs + +# CentOS +curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash - +yum install -y nodejs # CentOS 7 +dnf install -y nodejs # CentOS 8 +``` +By now, you should have NodeJS 12 installed. Make sure this is the case by checking `node -v` +### Install Yarn and Panel Dependencies +```bash +npm i -g yarn # Installs yarn +# Now you need to make sure you are in the panel directory +cd /var/www/pterodactyl +yarn install # Installs panel build dependencies +``` +## Build Panel +Run this in your panel directory to apply changes (usually `/var/www/pterodactyl`) +```bash +yarn build:production # Build panel +``` diff --git a/community/customization/wings.md b/community/customization/wings.md new file mode 100644 index 00000000..e1a9cea7 --- /dev/null +++ b/community/customization/wings.md @@ -0,0 +1,42 @@ +# Customizing Wings +:::warning Production +We highly recommend **NOT** performing these actions on production +::: + +In order to make changes to wings we recommend forking it to keep your own git version making upgrades easier.
+:::tip Editing Files +We do not provide a guide at the current time on what files to edit to get certain results. This guide expects a basic knowledge of the `go` language +::: + +## Building Wings +:::tip Build output +GO builds to be run on the build system therefore you **HAVE TO** run the build command on a linux system +::: + +### Build Requirements +GoLang compiler/runtime [https://golang.org/doc/install](https://golang.org/doc/install) + +### Building +Run the following command in your code directory +```bash +go build +``` +You should now have a `wings` binary file in your wings directory. +## Install the new binary + +:::tip User Access +In order to use the guide bellow you need sudo permission level you can atchive this by placing `sudo` in front of each command or running `sudo su -` in order to become root +::: + +1. Backup the current installation of wings + +```bash +# Stop Wings +systemctl stop wings +# Backup Wings +mv /usr/local/bin/wings /usr/local/bin/wingsOld +``` +2. Place the new binary in `/usr/local/bin` +3. Ensure aproperiate permissions on the binary `chmod u+x /usr/local/bin/wings` +4. Try running the updated binary from the console `wings --debug` +5. Restore normal operation of Wings `systemctl enable wings --now`