diff --git a/README.md b/README.md index 6388e752..46789895 100644 --- a/README.md +++ b/README.md @@ -601,7 +601,7 @@ Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`. [Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader. -The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of: +The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of: - The project "slug", which is located in the URL shown here: @@ -619,7 +619,7 @@ Furthermore, the resolved modpack version can be narrowed by setting `VERSION` t The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt". -Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here +Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here ![](docs/img/modrinth-version-id.drawio.png) @@ -933,7 +933,7 @@ https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar ``` > Blank lines and lines that start with a `#` will be ignored -> [This compose file](examples/docker-compose-mods-file.yml) shows another example of using this feature. +> [This compose file](examples/mods-file/docker-compose.yml) shows another example of using this feature. > It is recommended to combine this option with `REMOVE_OLD_MODS=TRUE` to ensure the mods/plugins remain consistent with the file's listing. diff --git a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md index b1ba2e9b..47beaa7c 100644 --- a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md +++ b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md @@ -2,7 +2,7 @@ [Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader. -The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of: +The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of: - The project "slug", which is located in the URL shown here: @@ -20,6 +20,6 @@ Furthermore, the resolved modpack version can be narrowed by setting `VERSION` t The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt". -Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here +Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here ![](../../img/modrinth-version-id.drawio.png) diff --git a/examples/modrinth-modpack/docker-compose.yml b/examples/modrinth-modpack/docker-compose.yml index 69d30843..64b42bd3 100644 --- a/examples/modrinth-modpack/docker-compose.yml +++ b/examples/modrinth-modpack/docker-compose.yml @@ -10,9 +10,9 @@ services: environment: EULA: "TRUE" MOD_PLATFORM: MODRINTH - MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2 + MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2 # or for auto-upgrading to latest - # MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric + # MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric # or just cobblemon-fabric or 5FFgwNNP # and could replace version URL with # MODRINTH_VERSION: nvrqJg44 diff --git a/examples/docker-compose-mods-file.yml b/examples/mods-file/docker-compose.yml similarity index 93% rename from examples/docker-compose-mods-file.yml rename to examples/mods-file/docker-compose.yml index 100e8984..19e6c4a2 100644 --- a/examples/docker-compose-mods-file.yml +++ b/examples/mods-file/docker-compose.yml @@ -10,7 +10,7 @@ services: MODS_FILE: /extras/mods.txt REMOVE_OLD_MODS: "true" ports: - - 25565:25565 + - "25565:25565" volumes: - data:/data - ./mods.txt:/extras/mods.txt:ro diff --git a/examples/mods.txt b/examples/mods-file/mods.txt similarity index 100% rename from examples/mods.txt rename to examples/mods-file/mods.txt diff --git a/scripts/start-deployModrinth b/scripts/start-deployModrinth index 176ccf7b..176ac960 100644 --- a/scripts/start-deployModrinth +++ b/scripts/start-deployModrinth @@ -6,15 +6,20 @@ set -eu resultsFile=/data/.install-modrinth.env -requireVar MODRINTH_PROJECT +: "${MODRINTH_MODPACK:=${MODRINTH_PROJECT:-}}" : "${MODRINTH_LOADER:=}" : "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}" +if [[ ! $MODRINTH_MODPACK ]]; then + log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH" + exit 1 +fi + isDebugging && set -x args=( --results-file="$resultsFile" - --project="${MODRINTH_PROJECT}" + --project="${MODRINTH_MODPACK}" --output-directory=/data )