-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from MrWeez/feat/better-1.0
feat: Better 1.0 docs and 1.0.x docs
- Loading branch information
Showing
34 changed files
with
1,824 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
48 changes: 48 additions & 0 deletions
48
versioned_docs/version-1.0.1/Contributing/CTRLPanel Test.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
:::info | ||
|
||
Please only use CTRLPanel installations that are not modifyed by plugins/modules/scripts or themes. | ||
|
||
::: | ||
|
||
This repository is using the playwright framework to provide E2E to help developers of the project to speed up development and provide a more stable and secure product. | ||
In case you wanna help by adding some tests, playwright got a awsome documentaion [here](https://playwright.dev/docs/intro) but here are some basics we already took care of so you can start right away. | ||
|
||
## Setup | ||
### Requirements | ||
- A setup version of CTRLPanel with the version you wanna test | ||
- A admin account & a user account on this panel | ||
- Basic knowlage of JS (or TS) | ||
- NodeJS 18+ | ||
|
||
### Instructions | ||
1: clone [this](https://github.com/Ctrlpanel-gg/ctrlpanel-tests) repo | ||
2: run `npm install` to install modules | ||
3: run `npx playwright install` to install playwright browsers | ||
4: rename .env.example to .env | ||
5: populate .env with your data | ||
6: you are ready to go | ||
|
||
## Testing | ||
### CLI | ||
`´npx playwright test` | ||
### UI | ||
`npx playwright test --ui` | ||
|
||
## Write your own tests | ||
### Simple rules | ||
Because you need to be logged in for almost everything, we already took care of this. | ||
Playwright tests are loaded by regex matches. | ||
To create a test that runs on a user account, name it like so: | ||
```shell | ||
[What is the test testing].[Permissions].[What is this file].js | ||
``` | ||
So for example: **server.user.test.js** (Testing servers, with a user account, and its a test) | ||
We setup a _admin_ and _user_ test env this way. | ||
|
||
### Make the test | ||
Playwright comes with a codegen funktion `npx playwright codegen`. | ||
With this its easy to get the selection of elements you want quickly and then write the test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Contributing", | ||
"position": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Contributing | ||
|
||
When contributing to this repository, please go through the open issues to see if you can contribute to something. Suppose you want to contribute something that is not in the issues; you can make an issue and wait for a response from the dev team. | ||
|
||
Please note, we have a code of conduct; please follow it in all your interactions with the project. | ||
|
||
## Pull request process | ||
|
||
1. Give your PR a good descriptive title to immediately view what the PR is about. | ||
2. The dev team will look at your code and approve/merge when possible. | ||
3. Make sure your PR follows our code of conduct and coding style. | ||
|
||
## Code of Conduct | ||
|
||
### Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
### Coding Style | ||
|
||
We are following the PSR12 code standard for PHP. | ||
|
||
### Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing other's private information, such as a physical or electronic address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Donating | ||
|
||
Love using ctrlpanel.gg? Support us to keep improving! 🌟 Enjoy perks like premium support & a unique Discord role! 💖 <br/> | ||
[Patreon](https://www.patreon.com/1day2die) | [Ko-fi](https://ko-fi.com/1day2die) | [GitHub Sponsors](https://github.com/sponsors/Ctrlpanel-gg) | ||
|
||
Your donations go a long way in helping us develop Ctrlpanel, but please don't feel obligated to.<br/> | ||
I will try to mention any donation above €1- in our Discord server. | ||
|
||
## Donator Roles | ||
|
||
**Sapphire** >= 100 $/€<br/> | ||
**Ruby Supporter** >= 50 $/€<br/> | ||
**Gold Supporter** >= 25 $/€<br/> | ||
**Silver Supporter** >= 15 $/€<br/> | ||
**Bronze Supporter** >= 5 $/€ <br/> | ||
_All Donators with a supporter role will also have access to a Donators Only channel and premium support_ | ||
|
||
_Please notify me when you've donated, so I can respond quicker :) **1Day2Die#6718**_ | ||
|
||
## Donators | ||
|
||
❤️ Ruby Supporter: **p47thiccbolt#4836**<br/> | ||
❤️ Ruby Supporter: **BolverBlitz#4881**<br/> | ||
❤️ Ruby Supporter: **ccrs#4120**<br/> | ||
❤️ Ruby Supporter: **Timo#4042**<br/> | ||
❤️ Ruby Supporter: **Sir Maddigan#0243**<br/> | ||
|
||
💛 Gold Supporter: **Wynn#1000**<br/> | ||
💛 Gold Supporter: **dragocz#0191**<br/> | ||
💛 Gold Supporter: **Niktix#3749** [TIX-Hosting](https://tix-hosting.net/)<br/> | ||
💛 Gold Supporter: **DerHorschty#3855**<br/> | ||
|
||
🤍 Silver Supporter: **TheFrodoDE#1337**<br/> | ||
|
||
🤎 Bronze Supporter: **Grosenberger#5417**<br/> | ||
🤎 Bronze Supporter: **ojacz#5091**<br/> | ||
🤎 Bronze Supporter: **Coconut#7171**<br/> | ||
🤎 Bronze Supporter: **Bazim#0485**<br/> | ||
🤎 Bronze Supporter: **Jonas.#9915**<br/> | ||
🤎 Bronze Supporter: **Vysoký Vagón#3796**<br/> | ||
🤎 Bronze Supporter: **I got 2 phones#8225**<br/> | ||
🤎 Bronze Supporter: **2IceCube#7992**<br/> | ||
🤎 Bronze Supporter: **ᴅᴏᴍɪɴɪᴋ#1005**<br/> | ||
🤎 Bronze Supporter: **DWAA#1660**<br/> | ||
🤎 Bronze Supporter: **ukcai#7121**<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Translating | ||
|
||
You can speak your mother tongue?<br/> | ||
You understand a certain language very well?<br/> | ||
Then we need exactly **you for our translator team!**<br/> | ||
|
||
After a long wait, the Ctrlpanel has now been equipped with a translation system.<br/> | ||
|
||
_Now we need people who help us translate!_<br/> | ||
|
||
## How to help | ||
|
||
The Translation list can be found here | ||
<https://crowdin.com/project/controlpanelgg> | ||
|
||
On this Website you will see every language we need to translate and the current progress. | ||
Feel free to contribute or correct any language you know. | ||
|
||
If you have a suggestion for a language or want to bring in your skills on a certain language, feel free to contact us on discord! | ||
|
||
## Translators | ||
|
||
:de: German: **1Day2Die#0849**<br/> | ||
:de: German: **BolverBlitz#4881**<br/> | ||
:it: Italian: **Dotto#8067**<br/> | ||
🇨🇳 Chinese: **Wynn#1314**<br/> | ||
🇨🇳 Chinese: **vlssu#9657**<br/> | ||
🇪🇸 Spanish: **JouRambo#1734**<br/> | ||
🇫🇷 French: **Paulon#9413**<br/> | ||
🇫🇷 French: **Loulou#0088**<br/> | ||
🇮🇳 Hindi: **Anas.#8899**<br/> | ||
🇮🇳 Hindi: **Abraar#7724**<br/> | ||
🇳🇱 Dutch: **Finniedj.exe#9075**<br/> | ||
🇳🇱 Dutch: **EzedOn#6947**<br/> | ||
🇵🇱 Polish: **mibek1011#1318**<br/> | ||
🇷🇺 Russian: **Namaker#2531**<br/> | ||
🇸🇪 Swedish: **Vermium#9649**<br/> | ||
🇵🇹 Portuguese: **Ferks#7575**<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Guides", | ||
"position": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Database backups | ||
|
||
:::info | ||
Users, folders and filenames have been renamed from "controlpanel" ⇒ "ctrlpanel". Be aware that the provided commands may not fit your installation. Please change the users, folder and filenames for the commands corresponding to your installation. | ||
::: | ||
|
||
All important data is stored in the database. This includes all servers, users, and other information. | ||
It's important to keep backups of your database to ensure that you can restore your panel if something goes wrong. | ||
|
||
import TOCInline from '@theme/TOCInline'; | ||
|
||
<TOCInline toc={toc} /> | ||
|
||
## How to back up | ||
|
||
You can use MySQL dump to back up your database. | ||
This command will create a backup file in the `/var/www/ctrlpanel/` folder. | ||
|
||
```bash | ||
mysqldump -u root -p ctrlpanel > /var/www/ctrlpanel/backup.sql | ||
``` | ||
|
||
## How to restore | ||
|
||
To restore a backup, you need a fresh database. If you already have a database, you can use the following command to drop it. | ||
|
||
:::warning | ||
|
||
Warning, this will delete all CtrlPanel related data! Make sure your database is backed up before continuing. | ||
|
||
```bash | ||
mysql -u root -p ctrlpanel -e "DROP DATABASE ctrlpanel" | ||
``` | ||
|
||
::: | ||
|
||
Then you can restore the backup. You can also restore the backup on any other new server. | ||
|
||
```bash | ||
mysql -u root -p | ||
CREATE DATABASE ctrlpanel; | ||
CREATE USER 'ctrlpaneluser'@'127.0.0.1' IDENTIFIED BY 'USE_YOUR_OWN_PASSWORD'; | ||
GRANT ALL PRIVILEGES ON ctrlpanel.* TO 'ctrlpaneluser'@'127.0.0.1'; | ||
FLUSH PRIVILEGES; | ||
exit | ||
mysql -u root -p ctrlpanel < /var/www/ctrlpanel/backup.sql | ||
``` | ||
|
||
If you have a backup from an older version of CtrlPanel, you have to migrate the database to the latest version. | ||
|
||
```bash | ||
cd /var/www/ctrlpanel | ||
sudo php artisan migrate --seed --force | ||
``` | ||
|
||
## How to automatically backup | ||
|
||
You can automatically back up your database every day at midnight, for example. | ||
First, create a read only user for the database. | ||
|
||
```bash | ||
mkdir -p /var/www/ctrlpanel/backups | ||
mysql -u root -p | ||
CREATE USER 'ctrlpanelbackupuser'@'127.0.0.1' IDENTIFIED BY 'USE_YOUR_OWN_PASSWORD'; | ||
GRANT LOCK TABLES, SELECT ON ctrlpanel.* TO 'ctrlpanelbackupuser'@'127.0.0.1'; | ||
FLUSH PRIVILEGES; | ||
exit | ||
``` | ||
|
||
Then create a cronjob to run the following command at midnight. | ||
Run `crontab -e` and add the following line: | ||
|
||
```bash | ||
0 0 * * * mysqldump -u ctrlpanelbackupuser --password=<USE_YOUR_OWN_PASSWORD> --single-transaction --quick --lock-tables=false ctrlpanel > /var/www/ctrlpanel/backups-$(date +\%F).sql | ||
``` | ||
|
||
This will create a backup at /var/www/ctrlpanel/backups-$(date +\%F).sql every day at midnight. | ||
Every file will have the date when it was made in the filename, so you can also resolve issues that happened a few days ago. | ||
|
||
## Appliaction key | ||
|
||
The application key is used to encrypt the data in the database, if its lost you will not be able to decrypt the data in the database. | ||
|
||
### Backup the application key | ||
|
||
To backup the appliaction key you need to get it from the .env file | ||
you can get there with this command: | ||
```nano /var/www/ctrlpanel/.env``` | ||
keep this key safe you will need later! | ||
|
||
### Restore the application key | ||
|
||
After you have reinstalled the panel go back into the .env | ||
```nano /var/www/ctrlpanel/.env``` | ||
You can then change the new key with the old key! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Products | ||
|
||
import DocusaurusImageUrl from '@site/static/img/docusaurus.png'; | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
||
With products, you can configure the resources allocated to new servers created on your panel. You can set the custom pricing and link products to specific nodes and eggs. | ||
You can check out the pterodactyl server creation page for more information about the specific options like CPU and IO. | ||
|
||
<img src={useBaseUrl('/img/userguides/product-page.png')} /> | ||
|
||
## Product Linking | ||
|
||
<img width="50%" height="50%" src={useBaseUrl('/img/userguides/product-linking-example.gif')} /><br/> | ||
Example of making a product for Minecraft servers. | ||
|
||
### Information | ||
|
||
Product linking allows you to configure the nodes and eggs this product can be a used on. | ||
For example, you have a node that is more powerful than another node, you may most likely want to charge a bit extra for the usage of this node. | ||
Or you may have a node dedicated for Minecraft hosting and another node for discord bots. Using the node and egg links, you can easily keep your pricing and server creation separated. | ||
|
||
### Hiding nodes and eggs | ||
|
||
You can hide specific nodes or eggs from being used by not configuring them in any of your products. This way, they won’t show up in the server creation page and therefore can’t be used by your customers. This is great if you have some nodes or eggs that you want to exclude from Ctrlpanel. | ||
|
||
### Tips | ||
|
||
If you have a well-configured product, you can use the Copy button to copy the product to create slight variations of it easily :) |
Oops, something went wrong.