Add the ability to define a configuration repo that's also live-downloaded
This commit is contained in:
parent
c50a4b4176
commit
2fba83fd15
@ -39,6 +39,7 @@ variable|description
|
|||||||
`JRE_XMX`|Maximum amount of heap passed to the main Minecraft process
|
`JRE_XMX`|Maximum amount of heap passed to the main Minecraft process
|
||||||
`JRE_XMS`|Minimum heap size passed to the main Minecraft process
|
`JRE_XMS`|Minimum heap size passed to the main Minecraft process
|
||||||
`FORGE_PACK_ZIP`|If provided, the URL to a zip or tar.gz file that contains the modpack that needs to be installed. Will be intelligently extracted into the server directory through the magic of `find`.
|
`FORGE_PACK_ZIP`|If provided, the URL to a zip or tar.gz file that contains the modpack that needs to be installed. Will be intelligently extracted into the server directory through the magic of `find`.
|
||||||
|
`CONFIG_REPO`|If provided, the URI to a git repository that contains configuration to copy over top the pack. The root of the repo will be the root of the server directory.
|
||||||
`ARGS`|Any additional arguments to be passed to the JVM
|
`ARGS`|Any additional arguments to be passed to the JVM
|
||||||
|
|
||||||
## Useful Arguments
|
## Useful Arguments
|
||||||
|
@ -20,6 +20,17 @@ if [ -n "$FORGE_PACK_ZIP" ]; then
|
|||||||
popd > /dev/null 2>&1
|
popd > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Then also download and extract a config repo, if one exists
|
||||||
|
if [ -n "$CONFIG_REPO" ]; then
|
||||||
|
echo "Downloading config repo: $CONFIG_REPO"
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
pushd "$tmpdir" > /dev/null 2>&1
|
||||||
|
git clone "$CONFIG_REPO" .
|
||||||
|
rm -rf .git
|
||||||
|
rsync -av ./ /minecraft/
|
||||||
|
popd > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
# Entrypoint will be server.jar
|
# Entrypoint will be server.jar
|
||||||
args="-jar server.jar nogui"
|
args="-jar server.jar nogui"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user