From d94de7a13bf474734e5081841a597a13b52a9ed8 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 3 Oct 2020 13:03:47 -0700 Subject: [PATCH] Source custom config from /app/data/env.sh --- start.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 38a65b0..1bb8405 100755 --- a/start.sh +++ b/start.sh @@ -9,8 +9,11 @@ mkdir -p /app/data/data /run/minio/config /run/minio/certs echo "==> Changing ownership" [[ $(stat --format '%U' /app/data/data) != "cloudron" ]] && chown -R cloudron:cloudron /app/data +[[ ! -f /app/data/env.sh ]] && echo -e "# Add custom minio configuration to this file\n\nexport CLOUDRON_MINIO_STARTUP_ARGS='server /app/data/data'" > /app/data/env.sh + +source /app/data/env.sh + # the --config-dir is deprecated and not used. but without it, minio will try to create $HOME/.minio :/ same for --certs-dir echo "==> Starting minio" -exec /usr/local/bin/gosu cloudron:cloudron /app/code/minio --certs-dir /run/minio/certs --config-dir /run/minio/config --quiet server --address :8000 /app/data/data - +exec /usr/local/bin/gosu cloudron:cloudron /app/code/minio --certs-dir /run/minio/certs --config-dir /run/minio/config --quiet --address :8000 ${CLOUDRON_MINIO_STARTUP_ARGS}