Skip to content

Commit

Permalink
Support local Modrinth modpack files (#2594)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Jan 15, 2024
1 parent 7a9e625 commit 7cb2c0d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/types-and-platforms/mod-platforms/modrinth-modpacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://modrinth.com/modpack/cobblemon-fabric>. 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:
Expand Down
15 changes: 15 additions & 0 deletions examples/modrinth/local-modpack/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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: {}

0 comments on commit 7cb2c0d

Please sign in to comment.