Added Forge README

pull/3/head
Jef Roosens 2020-12-30 16:59:05 +01:00
parent 9bb551601f
commit 643fd31547
2 changed files with 50 additions and 1 deletions

View File

@ -6,7 +6,7 @@ version of Fabric you wish to install. You can find the list of versions
# Environment variables # Environment variables
The two possible environment variables are `XMS` and `XMX`. These specify the The two possible environment variables are `XMS` and `XMX`. These specify the
initial RAM & maximum RAM usage, respectively. Only `XMS` is required; `XMX` is initial RAM & maximum RAM usage respectively. Only `XMS` is required; `XMX` is
just set to the same value as `XMS` if not specified. You must specify them as just set to the same value as `XMS` if not specified. You must specify them as
a number, e.g. `XMS=4`. This number represents a quantity of gigabytes. a number, e.g. `XMS=4`. This number represents a quantity of gigabytes.

49
forge/README.md 100644
View File

@ -0,0 +1,49 @@
# Build arguments
Two build arguments are required, namely `MC_VERSION` and `FORGE_VERSION`. You
can find your required versions [here](https://files.minecraftforge.net/).
Then, you can specify them in the `.env` file:
```
MC_VERSION=1.16.4
FORGE_VERSION=35.1.4
```
# Environment variables
The two possible environment variables are `XMS` and `XMX`. These specify the
initial RAM & maximum RAM usage respectively. Only `XMS` is required; `XMX` is
just set to the same value as `XMS` if not specified. You must specify them as
a number, e.g. `XMS=4`. This number represents a quantity of gigabytes.
# Mount points
There a three useful mount points defined:
* `/mc/config`: this is where all server config files reside.
* `/mc/config/mods`: this is where all mods should be placed.
* `/mc/worlds`: this is where the world files are stored.
You can mount these directories somewhere in the host file system by specifying
the mount paths in the `.env` file. These can be both absolute or relative
paths.
# Other config variables
The only other config variable is `PORT`. This specifies on what port your
server will be discoverable over the internet. The default Minecraft port is
`25565`.
# Java flags
I use the Java flags defined
[here](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/).
If you don't agree with this decision, you can change the `ENTRYPOINT` at the
end of the `Dockerfile` to the following:
```
ENTRYPOINT java \
-Xms"${XMS}G" \
-Xmx"${XMX:-$XMS}G" \
-jar "$FORGE_JAR" \
--universe /mc/worlds \
--nogui
```
This will only use the flags absolutely necessary, while still allowing you to
tweak the memory variables.