Browse Source

allow optionally change volume max count

Chris Lu 4 years ago
parent
commit
ab4c9ac221
1 changed files with 6 additions and 0 deletions
  1. 6 0
      docker/entrypoint.sh

+ 6 - 0
docker/entrypoint.sh

@@ -9,11 +9,17 @@ case "$1" in
 
   'volume')
   	ARGS="-dir=/data -max=0"
+  	if [[ $@ == *"-max="* ]]; then
+  	  ARGS="-dir=/data"
+  	fi
   	exec /usr/bin/weed $@ $ARGS
 	;;
 
   'server')
   	ARGS="-dir=/data -volume.max=0 -master.volumePreallocate -master.volumeSizeLimitMB=1024"
+  	if [[ $@ == *"-volume.max="* ]]; then
+  	  ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024"
+  	fi
   	exec /usr/bin/weed $@ $ARGS
   	;;