1
0
mirror of https://git.cloudron.io/cloudron/minio-app synced 2025-09-25 22:47:23 +00:00

Added new console binary, added port to config, added default env for redirect

This commit is contained in:
Elias Hackradt
2021-07-11 22:15:23 +02:00
parent c65ab2057f
commit 612d47f4ac
3 changed files with 20 additions and 6 deletions

View File

@@ -9,11 +9,16 @@ 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. Restart the app for changes to take effect.\n\nexport CLOUDRON_MINIO_STARTUP_ARGS='server /app/data/data'" > /app/data/env.sh
if [[ ! -f /app/data/env.sh ]]; then
echo -e "# Add custom minio configuration to this file. Restart the app for changes to take effect.\n\nexport CLOUDRON_MINIO_STARTUP_ARGS='server /app/data/data'" > /app/data/env.sh
echo -e "MINIO_BROWSER_REDIRECT_URI=$(echo $CLOUDRON_APP_ORIGIN)" >> /app/data/env.sh
# echo -e "CONSOLE_PBKDF_PASSPHRASE=$(openssl rand -hex 64)" >> /app/data/env.sh
# echo -e "CONSOLE_PBKDF_SALT=$(openssl rand -hex 64)" >> /app/data/env.sh
# echo -e "CONSOLE_MINIO_SERVER=http://localhost:9000" >> /app/data/env.sh
fi
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 ${CLOUDRON_MINIO_STARTUP_ARGS} --address :8000
exec /usr/local/bin/gosu cloudron:cloudron /app/code/minio --certs-dir /run/minio/certs --config-dir /run/minio/config --quiet ${CLOUDRON_MINIO_STARTUP_ARGS} --address :$API_PORT --console-address :8000