From 7cb2c0ddc7b4af686115f6266893daf916a45fde Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 15 Jan 2024 11:43:38 -0600 Subject: [PATCH] Support local Modrinth modpack files (#2594) --- Dockerfile | 2 +- .../mod-platforms/modrinth-modpacks.md | 6 ++++++ .../modrinth/local-modpack/docker-compose.yml | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 examples/modrinth/local-modpack/docker-compose.yml diff --git a/Dockerfile b/Dockerfile index d63f326..bece6ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,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.37.6 +ARG MC_HELPER_VERSION=1.37.7 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/types-and-platforms/mod-platforms/modrinth-modpacks.md b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md index 1c34514..eb726f3 100644 --- a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md +++ b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md @@ -9,11 +9,17 @@ The desired modpack project is specified with the `MODRINTH_MODPACK` environment - The project "slug", which is located in the URL shown here: ![](../../img/modrinth-project-slug.drawio.png) + - The project ID, which is located in the bottom of the left panel, shown here ![](../../img/modrinth-project-id.drawio.png) + - The project page URL, such as . As described below, this can further be the page URL of a modpack's version page. +- A custom URL of a hosted [mrpack file](https://support.modrinth.com/en/articles/8802351-modrinth-modpack-format-mrpack) + +- The container path to a local [mrpack file](https://support.modrinth.com/en/articles/8802351-modrinth-modpack-format-mrpack) + ## Modpack version The automatic modpack version resolving can be narrowed in a few ways: diff --git a/examples/modrinth/local-modpack/docker-compose.yml b/examples/modrinth/local-modpack/docker-compose.yml new file mode 100644 index 0000000..a4f75ec --- /dev/null +++ b/examples/modrinth/local-modpack/docker-compose.yml @@ -0,0 +1,15 @@ +services: + mc: + image: itzg/minecraft-server + environment: + EULA: true + MOD_PLATFORM: MODRINTH + # Download the mrpack file from https://modrinth.com/modpack/cobblemon-fabric/version/1.4.1 and place in + # modpacks directory next to this compose file. + MODRINTH_MODPACK: /modpacks/Cobblemon Modpack [Fabric] 1.4.1.mrpack + volumes: + - mc-data:/data + - ./modpacks:/modpacks:ro + +volumes: + mc-data: {} \ No newline at end of file