From 0d5e44a3387bfd5462342e5729351b719c357178 Mon Sep 17 00:00:00 2001 From: Ryan Conrad Date: Thu, 30 Mar 2023 17:44:30 -0500 Subject: [PATCH] Auto CurseForge, added docs to use env file (#2054) --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b2e1b45a..5b381e67 100644 --- a/README.md +++ b/README.md @@ -631,6 +631,17 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat > ```shell > docker run ... -e "CF_API_KEY=\$11\$22\$33aaaaaaaaaaaaaaaaaaaaaaaaaa" > ``` +> You can use a `.env` file, in the same directory as your `docker-compose.yaml`, and define your API Key there to remove the need to escape the `$` in your API Key. The `.env` file is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). +> +> *.env* +> ``` +> CF_API_KEY=$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa +> ``` +> +> To use with `docker run` you need to specify the `.env` file +> ``` +> docker run --env-file=.env itzg/minecraft-server +> ``` > > Be sure to use the appropriate [image tag for the Java version compatible with the modpack](#running-minecraft-server-on-different-java-version). >