Explorar o código

Changed readme to include environment variables

Added additional arguments
Spencer Gardner %!s(int64=7) %!d(string=hai) anos
pai
achega
dd5b4906f1
Modificáronse 2 ficheiros con 16 adicións e 3 borrados
  1. 14 1
      README.md
  2. 2 2
      entrypoint.sh

+ 14 - 1
README.md

@@ -14,8 +14,21 @@ The goal of this image is to easily run [Minecraft Overviewer](https://overviewe
 docker run \
   --rm \
   -e MINECRAFT_VERSION=1.11.2 \
-  -e GOOGLE_MAPS_API_KEY=<Google Maps API Key>
+  -e GOOGLE_MAPS_API_KEY=<Google Maps API Key> \
+  -e POI_ONLY=n \
+  -e OVERVIEWER_PARAMS="--processes 2"\
   -v /home/user/minecraft/:/home/minecraft/server/:ro \
   -v /srv/http/minecraft/:/home/minecraft/render/:rw \
   mide/minecraft-overviewer:latest
 ```
+
+## Environment Variables
+
+### `POI_ONLY`
+Only generate the points of interest and not the map tiles.
+
+### `GOOGLE_MAPS_API_KEY`
+Set the optional google maps api key.
+
+### `OVERVIEWER_PARAMS`
+Pass additional arguments to overviewer

+ 2 - 2
entrypoint.sh

@@ -13,11 +13,11 @@ wget -N https://s3.amazonaws.com/Minecraft.Download/versions/${MINECRAFT_VERSION
 # Run the world renders (One pass to make map, one to generate points of interests)
 
 if [ "$POI_ONLY" != "y" ]; then
-  overviewer.py --config /home/minecraft/config.py
+  overviewer.py --config /home/minecraft/config.py $OVERVIEWER_PARAMS
   # Add Google Maps API key if the GOOGLE_MAPS_API_KEY environment variable is set
   if [ "$GOOGLE_MAPS_API_KEY" ]; then
     sed -i "s|https://maps.google.com/maps/api/js|&?key=${GOOGLE_MAPS_API_KEY}|g" /home/minecraft/render/index.html
   fi
 fi
 
-overviewer.py --config /home/minecraft/config.py --genpoi
+overviewer.py --config /home/minecraft/config.py --genpoi $OVERVIEWER_PARAMS