Revert "Add support of CF_API_KEY_FILE environment variable" (#3402)

This commit is contained in:
Geoff Bourne
2025-04-05 09:13:18 -05:00
committed by GitHub
parent 04713222c9
commit 5fad540c57
5 changed files with 3 additions and 33 deletions

View File

@@ -6,7 +6,7 @@ A specific file can be omitted from each reference to allow for auto-selecting t
!!! warning "CurseForge API key usage"
A CurseForge API key must be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
A CurseForge API key must be allocated and set with `CF_API_KEY` [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
## Project-file references

View File

@@ -32,19 +32,6 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
docker run --env-file=.env itzg/minecraft-server
```
Alternately you can use [docker secrets](https://docs.docker.com/compose/how-tos/use-secrets/) with a `CF_API_KEY_FILE` environment variable:
```
service:
environment:
CF_API_KEY_FILE: /run/secrets/cf_api_key.secret
secrets:
- cf_api_key
secrets:
cf_api_key:
file: cf_api_key.secret
```
!!! note
Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../../versions/java.md).

View File

@@ -730,12 +730,6 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
<td><code></code></td>
<td>✅</td>
</tr>
<tr>
<td><code>CF_API_KEY_FILE</code></td>
<td>A path to a file inside of container that contains <strong>YOUR</strong> CurseForge (Eternal) API Key.</td>
<td><code></code></td>
<td>✅</td>
</tr>
<tr>
<td><code>CF_PAGE_URL</code></td>
<td>Pass a page URL to the modpack or a specific file</td>

View File

@@ -24,11 +24,6 @@ set -eu
resultsFile=/data/.install-curseforge.env
if [[ -n ${CF_API_KEY_FILE} ]]; then
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
export CF_API_KEY
fi
isDebugging && set -x
ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE"
@@ -66,7 +61,7 @@ if ! mc-image-helper install-curseforge "${args[@]}"; then
exit 1
fi
applyResultsFile "${resultsFile}"
applyResultsFile ${resultsFile}
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -13,12 +13,6 @@ set -e -o pipefail
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
sum_file=/data/.generic_pack.sum
if [[ -n ${CF_API_KEY_FILE} ]]; then
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
export CF_API_KEY
fi
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
@@ -201,7 +195,7 @@ function handleGenericPacks() {
# Disable mods
for mod in ${GENERIC_PACKS_DISABLE_MODS}; do
log Disabling "$mod"
log Disabling $mod
find "${base_dir}" -name "$mod" -exec mv {} {}.disabled -v \;
done