Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz

ARG MC_HELPER_VERSION=1.24.13
ARG MC_HELPER_VERSION=1.24.16
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ docker run -d --name mc-ftb -e EULA=TRUE \

### Auto CurseForge Management

To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack.
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.

> **NOTES:**
> Be sure to use the appropriate [image tag for the Java version compatible with the modpack](#running-minecraft-server-on-different-java-version).
Expand Down Expand Up @@ -653,7 +653,7 @@ The following two examples both refer to version 1.0.7 of ATM8:
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8 -e CF_FILENAME_MATCHER=1.0.7
```

A lot of the time there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes two options to exclude/include mods:
Quite often there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes two options to exclude/include mods:

Global and per modpack exclusions can be declared in a JSON file and referenced with `CF_EXCLUDE_INCLUDE_FILE`. By default, [the file bundled with the image](files/cf-exclude-include.json) will be used. The schema of this file [is documented here](https://github.com/itzg/mc-image-helper#excludeinclude-file-schema).

Expand All @@ -666,8 +666,13 @@ If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true"

> **NOTE:** these options are provided to empower you get your server up and running quickly. Please help out by reporting an issue with the respective mod project. Ideally mod developers should [use correct registrations for one-sided client mods](https://docs.minecraftforge.net/en/latest/concepts/sides/#writing-one-sided-mods). Understandably, those code changes may be non-trivial, so mod authors can also add "Client" to the game versions when publishing.

Some modpacks come with world/save data via a worlds file and/or the overrides provided with the modpack. Either approach can be selected to set the `LEVEL` to the resulting saves directory by setting `CF_SET_LEVEL_FROM` to either:
- `WORLD_FILE`
- `OVERRIDES`

Other configuration available:
- `CF_PARALLEL_DOWNLOADS` (default is 4): specify how many parallel mod downloads to perform
- `CF_OVERRIDES_SKIP_EXISTING` (default is false): if set, files in the overrides that already exist in the data directory are skipped. **NOTE** world data is always skipped, if present.

### Old approach

Expand Down
19 changes: 19 additions & 0 deletions examples/one-block-modded/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3.8"

services:
mc:
image: itzg/minecraft-server
ports:
- "25565:25565"
environment:
EULA: "true"
TYPE: AUTO_CURSEFORGE
CF_PAGE_URL: "https://www.curseforge.com/minecraft/modpacks/one-block-modded/files/4136487"
CF_SET_LEVEL_FROM: OVERRIDES
DEBUG: "false"
MEMORY: 4G
volumes:
- mc-data:/data

volumes:
mc-data: {}
7 changes: 7 additions & 0 deletions scripts/start-deployAutoCF
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ set -eu
: "${CF_EXCLUDE_INCLUDE_FILE:=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json}"
: "${CF_EXCLUDE_MODS:=}"
: "${CF_FORCE_INCLUDE_MODS:=}"
: "${CF_SET_LEVEL_FROM:=}" # --set-level-from
: "${CF_OVERRIDES_SKIP_EXISTING:=false}" # --overrides-skip-existing


resultsFile=/data/.install-curseforge.env

Expand All @@ -33,9 +36,13 @@ fi
if [[ $CF_FILENAME_MATCHER ]]; then
args+=(--filename-matcher="$CF_FILENAME_MATCHER")
fi
if [[ ${CF_SET_LEVEL_FROM} ]]; then
args+=(--set-level-from="$CF_SET_LEVEL_FROM")
fi
args+=(
--parallel-downloads="$CF_PARALLEL_DOWNLOADS"
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
)

if [[ $CF_EXCLUDE_MODS || $CF_FORCE_INCLUDE_MODS ]]; then
Expand Down