diff --git a/Dockerfile b/Dockerfile index 284d70d2c2f..39923b175e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.41.2 +ARG MC_HELPER_VERSION=1.41.5 ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} # used for cache busting local copy of mc-image-helper ARG MC_HELPER_REV=1 diff --git a/docs/mods-and-plugins/index.md b/docs/mods-and-plugins/index.md index e7483691592..d4a005df534 100644 --- a/docs/mods-and-plugins/index.md +++ b/docs/mods-and-plugins/index.md @@ -16,7 +16,9 @@ On the left, there are sections describing some download automation options. ## Mods vs Plugins -The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins" +The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins". + +Typically, mods needs to be installed in both the client and server; however, there are some cases when only the server needs a mod. Plugins only need to be installed in the server and are never needed in the client. ## Optional plugins, mods, and config attach points @@ -41,8 +43,28 @@ For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMO These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive. -!!! information "" - For more flexibility with mods/plugins preparation, you can declare other directories, files, and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list). +!!! information "Multiple source directories" + + `COPY_PLUGINS_SRC`, `COPY_MODS_SRC`, `COPY_CONFIG_SRC` can each be set to a comma or newline delimited list of container directories to reference. + + For example, in a compose file: + + ```yaml + environment: + # ...EULA, etc + TYPE: PAPER + # matches up to volumes declared below + COPY_PLUGINS_SRC: /plugins-common,/plugins-local + volumes: + - mc-data:/data + # For example, reference a shared directory used by several projects + - ../plugins-common:/plugins-common:ro + # and add plugins unique to this project + - ./plugins:/plugins-local:ro + ``` + + Alternatively, you can declare other directories along with files and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list). + ## Zip file modpack diff --git a/examples/docker-compose-paper.yml b/examples/paper/compose.yml similarity index 69% rename from examples/docker-compose-paper.yml rename to examples/paper/compose.yml index f429b4ac592..cc1f195ad8d 100644 --- a/examples/docker-compose-paper.yml +++ b/examples/paper/compose.yml @@ -1,16 +1,16 @@ services: mc: image: itzg/minecraft-server - container_name: paper + tty: true + stdin_open: true environment: EULA: "true" TYPE: PAPER - VIEW_DISTANCE: 10 MEMORY: 2G ports: - "25565:25565" volumes: - - mc-paper:/data + - mc-data:/data restart: unless-stopped volumes: - mc-paper: {} + mc-data: {} diff --git a/examples/paper-build-plugins/Dockerfile b/examples/paper/paper-build-plugins/Dockerfile similarity index 100% rename from examples/paper-build-plugins/Dockerfile rename to examples/paper/paper-build-plugins/Dockerfile diff --git a/examples/paper-build-plugins/docker-compose.yml b/examples/paper/paper-build-plugins/docker-compose.yml similarity index 100% rename from examples/paper-build-plugins/docker-compose.yml rename to examples/paper/paper-build-plugins/docker-compose.yml diff --git a/examples/paper-build-plugins/plugins/.gitignore b/examples/paper/paper-build-plugins/plugins/.gitignore similarity index 100% rename from examples/paper-build-plugins/plugins/.gitignore rename to examples/paper/paper-build-plugins/plugins/.gitignore diff --git a/examples/paper-build-plugins/plugins/README.md b/examples/paper/paper-build-plugins/plugins/README.md similarity index 100% rename from examples/paper-build-plugins/plugins/README.md rename to examples/paper/paper-build-plugins/plugins/README.md diff --git a/examples/paper-proxy-protocol/config/paper-global.yml b/examples/paper/paper-proxy-protocol/config/paper-global.yml similarity index 100% rename from examples/paper-proxy-protocol/config/paper-global.yml rename to examples/paper/paper-proxy-protocol/config/paper-global.yml diff --git a/examples/paper-proxy-protocol/docker-compose.yml b/examples/paper/paper-proxy-protocol/docker-compose.yml similarity index 100% rename from examples/paper-proxy-protocol/docker-compose.yml rename to examples/paper/paper-proxy-protocol/docker-compose.yml diff --git a/scripts/start-setupMounts b/scripts/start-setupMounts index 84e83146ab4..cff4561ce21 100755 --- a/scripts/start-setupMounts +++ b/scripts/start-setupMounts @@ -38,7 +38,7 @@ function mc-image-helper-mounts(){ : "${COPY_PLUGINS_SRC:="/plugins"}" : "${COPY_PLUGINS_DEST:=${PLUGINS_OUT_DIR}}" -if usesPlugins && [ -d "${COPY_PLUGINS_SRC}" ]; then +if usesPlugins; then mkdir -p "${COPY_PLUGINS_DEST}" log "Copying any plugins from ${COPY_PLUGINS_SRC} to ${COPY_PLUGINS_DEST}" mc-image-helper-mounts "${COPY_PLUGINS_SRC}" "${COPY_PLUGINS_DEST}" @@ -47,7 +47,7 @@ fi : "${COPY_MODS_SRC:="/mods"}" : "${COPY_MODS_DEST:=${MODS_OUT_DIR}}" -if usesMods && [ -d "${COPY_MODS_SRC}" ]; then +if usesMods; then log "Copying any mods from ${COPY_MODS_SRC} to ${COPY_MODS_DEST}" mc-image-helper-mounts "${COPY_MODS_SRC}" "${COPY_MODS_DEST}" fi @@ -55,9 +55,7 @@ fi : "${COPY_CONFIG_SRC:="/config"}" : "${COPY_CONFIG_DEST:="/data/config"}" -if [ -d "${COPY_CONFIG_SRC}" ]; then - log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}" - mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}" -fi +log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}" +mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}" exec "${SCRIPTS:-/}start-setupServerProperties" "$@"