Add PAPER_CONFIG_REPO as alias for defaults repo variable (#3076)

This commit is contained in:
Tomás Alegre Sepúlveda 2024-09-23 09:31:04 -03:00 committed by GitHub
parent 295996b033
commit df8f8f1716
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 78 additions and 1 deletions

View file

@ -0,0 +1,60 @@
# A Form to Load New Config Files to Paper MC
In this example, we illustrate how to efficiently load and manage different configuration files to optimize a Paper Minecraft server. To implement this, it is necessary to create a dedicated repository where the configuration files can be stored and later retrieved. The repository should adhere to a specific structure to facilitate seamless integration with your Docker setup. Notably, the configurations must be organized into a folder named after the version of Minecraft you are using.
For reference, I have provided this [repository](https://github.com/Alpha018/paper-config-optimized), which contains optimized configuration files for the latest version of Minecraft. You can use this repository by linking directly to the configuration files in your Docker file, as demonstrated in the example below.
## Usage
You can directly use the optimized configuration files from this repository by accessing them through the GitHub raw URLs. Simply replace the env var like the docker compose with any other repo with different configurations.
To use the raw files, you can download or link to them using the following pattern:
```yaml
services:
mc:
image: itzg/minecraft-server
container_name: paper
environment:
EULA: "true"
TYPE: "PAPER"
VIEW_DISTANCE: 10
MEMORY: 2G
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/[your-username]/[your-repository]/main/[file-path]"
ports:
- "25565:25565"
volumes:
- mc-paper:/data
restart: unless-stopped
volumes:
mc-paper: {}
```
For example:
```yaml
services:
mc:
image: itzg/minecraft-server
container_name: paper
environment:
EULA: "true"
TYPE: "PAPER"
VIEW_DISTANCE: 10
MEMORY: 2G
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
ports:
- "25565:25565"
volumes:
- mc-paper:/data
restart: unless-stopped
volumes:
mc-paper: {}
```
Feel free to explore and use the configurations in this repo to enhance your Minecraft server's performance.
## Contribution
If you'd like to improve or suggest changes to these configurations, feel free to submit a pull request in this [repository](https://github.com/Alpha018/paper-config-optimized). We welcome contributions from the community!

View file

@ -0,0 +1,17 @@
services:
mc:
image: itzg/minecraft-server
container_name: paper
environment:
EULA: "true"
TYPE: "PAPER"
VIEW_DISTANCE: 10
MEMORY: 2G
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
ports:
- "25565:25565"
volumes:
- mc-paper:/data
restart: unless-stopped
volumes:
mc-paper: {}

View file

@ -10,7 +10,7 @@ handleDebugMode
: "${PAPER_CHANNEL:=default}"
: "${PAPER_DOWNLOAD_URL:=}"
: "${PAPER_CUSTOM_JAR:=}"
: "${PAPER_CONFIG_DEFAULTS_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}"
: "${PAPER_CONFIG_DEFAULTS_REPO:=${PAPER_CONFIG_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}}"
resultsFile=/data/.paper.env
if [[ $PAPER_CUSTOM_JAR ]]; then