diff --git a/CloudronManifest.json b/CloudronManifest.json index 59f33e6..e3185d4 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -9,8 +9,8 @@ "healthCheckPath": "/minio/login", "httpPort": 8000, "httpPorts": { - "API_DOMAIN": { - "title": "API Domain", + "API_SERVER_DOMAIN": { + "title": "API Server Domain", "description": "The domain name for MinIO (S3) API requests", "containerPort": 9000, "defaultValue": "minio-api" diff --git a/start.sh b/start.sh index d3ea368..7655f58 100755 --- a/start.sh +++ b/start.sh @@ -9,28 +9,12 @@ 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 +# https://docs.min.io/minio/baremetal/reference/minio-server/minio-server.html#envvar.MINIO_SERVER_URL +export MINIO_SERVER_URL="https://${API_SERVER_DOMAIN}" +export MINIO_BROWSER_REDIRECT_URL="https://${CLOUDRON_APP_DOMAIN}" + 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 - # https://github.com/minio/minio#things-to-consider - echo -e "export MINIO_BROWSER_REDIRECT_URI=$(echo $CLOUDRON_APP_ORIGIN)" >> /app/data/env.sh - # ###### ! WARNING ! LDAP IS DISABLED FOR NOW ###### - # https://github.com/minio/minio/blob/master/docs/sts/ldap.md - # https://docs.min.io/minio/baremetal/security/ad-ldap-external-identity-management/configure-ad-ldap-external-identity-management.html#minio-authenticate-using-ad-ldap-generic - # (address) AD/LDAP server address e.g. "myldapserver.com:636" - # echo -e "export MINIO_IDENTITY_LDAP_SERVER_ADDR='$(echo $CLOUDRON_LDAP_SERVER):$(echo $CLOUDRON_LDAP_PORT)'" >> /app/data/env.sh - # (string) DN for LDAP read-only service account used to perform DN and group lookups - # echo -e "export MINIO_IDENTITY_LDAP_LOOKUP_BIND_DN='$(echo $CLOUDRON_LDAP_BIND_DN)'" >> /app/data/env.sh - # (string) Password for LDAP read-only service account used to perform DN and group lookups - # echo -e "export MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD='$(echo $CLOUDRON_LDAP_BIND_PASSWORD)'" >> /app/data/env.sh - # (string) Base LDAP DN to search for user DN - # echo -e "export MINIO_IDENTITY_LDAP_USER_DN_SEARCH_BASE_DN='$(echo $CLOUDRON_LDAP_USERS_BASE_DN)'" >> /app/data/env.sh - # (string) Search filter to lookup user DN - # echo -e "export MINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER='(&(objectclass=user)(|(username=%uid)(mail=%uid)))'" >> /app/data/env.sh - # https://docs.min.io/minio/baremetal/reference/minio-server/minio-server.html#envvar.MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY - # echo -e "export MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY='on'" >> /app/data/env.sh - # https://docs.min.io/minio/baremetal/reference/minio-server/minio-server.html#envvar.MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY - # echo -e "export MINIO_IDENTITY_LDAP_SERVER_INSECURE='on'" >> /app/data/env.sh - # ###### ! WARNING ! LDAP IS DISABLED FOR NOW ###### fi if [[ ! -d /app/data/mc_config ]]; then @@ -42,5 +26,7 @@ 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 +# MinIO Console is an embedded web-based object browser built into MinIO Server 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 :$API_PORT --console-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 :9000 --console-address :8000 +