auto_cf: write mods needing manual download to file (#2263)

This commit is contained in:
Geoff Bourne 2023-07-02 09:22:12 -05:00 committed by GitHub
parent 2611551076
commit 98e939d937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 3 deletions

View file

@ -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.32.4
ARG MC_HELPER_VERSION=1.32.5
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1

View file

@ -58,6 +58,9 @@ For example:
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
!!! note "Mods need download report"
A file called `MODS_NEED_DOWNLOAD.txt` will be created in the `/data` directory that lists the mods that need to be manually downloaded and where to get them.
If you wish to use a unpublished modpack zip, set the container path to the file in `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, **the modpack slug or page URL must still be provided**.
The latest file will be located and used by default, but if a specific version is desired you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup.
@ -98,7 +101,7 @@ For more complex scenarios, global and per modpack exclusions can be declared in
If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true" to ensure the exclude/includes are re-evaluated.
!!! important
These options are provided to empower you to 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.
These options are provided to empower you to 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.
## Extra options

1
examples/.gitignore vendored
View file

@ -1,2 +1,3 @@
data/
modpacks/
.env

View file

@ -0,0 +1,18 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server:java8-multiarch
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: rlcraft
CF_FILENAME_MATCHER: 2.9.3
CF_FORCE_SYNCHRONIZE: true
MEMORY: 4G
volumes:
- ./data:/data
ports:
- "25565:25565"