mirror of
https://github.com/parkervcp/eggs.git
synced 2024-12-02 04:42:53 +08:00
Merge pull request #1816 from parkervcp/update/contributing
docs: update contribution guidelines
This commit is contained in:
commit
bb46921677
@ -1,39 +1,51 @@
|
|||||||
# So you want to make an Egg
|
# How to contribute
|
||||||
|
|
||||||
## General rules
|
You can contribute by either creating a new pull request or testing [existing pull requests](https://github.com/parkervcp/eggs/pulls) and commenting on whether the egg works for you or not. Testing is very important and helpful!
|
||||||
|
|
||||||
|
## General rules for eggs
|
||||||
|
|
||||||
1. Keep it simple.
|
1. Keep it simple.
|
||||||
We don't need 8 miles of install script.
|
We don't need 8 miles of the install script.
|
||||||
|
|
||||||
2. Keep it Small.
|
2. Keep it small.
|
||||||
Only use what is absolutely needed.
|
Only use what is absolutely needed. The [Yolks install images](https://github.com/parkervcp/yolks#installation-images) already contain the most basic packages that speeds up the installation process.
|
||||||
|
|
||||||
3. Try to stay in the stock containers.
|
3. Use the stock images.
|
||||||
If you need something in a container, open a PR in [my yolks repo](https://github.com/parkervcp/yolks) where I can review and pull it up to the main repo. In addition, there is a larger quantity of [images here](https://github.com/parkervcp/images) for you to use that have not been migrated to Yolks yet.
|
If you need something in an image, open a PR in [my yolks repo](https://github.com/parkervcp/yolks) where it can be reviewed and built. Self-hosted or third-party images won't be accepted for security reasons.
|
||||||
|
|
||||||
4. Don't be afraid to submit PR's to the egg repo.
|
4. Don't be afraid to submit PR's to the egg repo.
|
||||||
I don't bite. I will work with you on the egg and the required things to run it.
|
I don't bite. I will work with you on the egg and the required things to run it. Feel free to open a draft PR if you don't quite have the egg finished yet by yourself.
|
||||||
|
|
||||||
|
### Sources for working on a new egg
|
||||||
|
|
||||||
|
Look at existing eggs to see how they work. In most cases, you can take the existing egg as your new template. There's a brief documentation on how to [create eggs](https://pterodactyl.io/community/config/eggs/creating_a_custom_egg.html) and [Docker images](https://pterodactyl.io/community/config/eggs/creating_a_custom_image.html).
|
||||||
|
|
||||||
|
Use existing Docker images for your egg. You can find them in [Parkers Yolks fork](https://github.com/parkervcp/yolks) and [Pterodactyl Yolks](https://github.com/pterodactyl/yolks).
|
||||||
|
|
||||||
|
We have a collection of [existing install script snippets](https://github.com/parkervcp/eggs/tree/master/scripts) that you can use.
|
||||||
|
|
||||||
## Step 1
|
## Step 1
|
||||||
|
|
||||||
### Be aware of the pterodactyl install process
|
### Be aware of the pterodactyl install process
|
||||||
|
|
||||||
The Pterodactyl install process is fairly simple once you know.
|
The Pterodactyl install process is fairly simple once you know it.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
1. Spin up install container
|
1. Spin up install container
|
||||||
This uses a volume mount on /mnt/server for the server files.
|
Creates a new container using an install image that's run as root.
|
||||||
This can pull or set up all that is needed to run the server.
|
Uses a volume mount on `/mnt/server` for the server files, which is the working directory during installation.
|
||||||
|
The volume will be later mounted as `/home/container` for the server container. Any files outside of `/mnt/server` will be gone after installation.
|
||||||
|
Install script can pull files or set up all that is needed to run the server, such as writing files, directories or compiling apps.
|
||||||
It is regularly used to just download the files required. Such as server files and configs.
|
It is regularly used to just download the files required. Such as server files and configs.
|
||||||
|
|
||||||
|
|
||||||
2. Stop install container
|
2. Stop and destroy install container
|
||||||
|
|
||||||
3. Start a new container with the server files in /home/container
|
3. Start a new container with the server files in /home/container
|
||||||
This is where the server is actually run.
|
This is where the server is actually run. No root privileges.
|
||||||
Any dependencies installed during the install process are gone.
|
Any dependencies installed during the install process are gone.
|
||||||
The container that is started should have everything you need.
|
The container that is started should have everything you need.
|
||||||
|
No packages can be installed. Any required dependencies must exist in the used Docker image.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 2
|
## Step 2
|
||||||
@ -49,4 +61,8 @@ This is to maintain a clean repo that others can pull and be fully aware of what
|
|||||||
|
|
||||||
### Make a branch and do your work in there
|
### Make a branch and do your work in there
|
||||||
|
|
||||||
I have been getting messy PR's due to people always PRing from their master branch. Please make a seperate branch and PR from there.
|
I have been getting messy PR's due to people always PRing from their master branch. Please make a separate branch and PR from there.
|
||||||
|
|
||||||
|
## Step 4
|
||||||
|
|
||||||
|
Open a new pull request and fill in the template. Make sure that the readme files have been updated to include the new egg.
|
||||||
|
Loading…
Reference in New Issue
Block a user