diff --git a/minio/Dockerfile b/minio/Dockerfile index c15f82d..609e42e 100644 --- a/minio/Dockerfile +++ b/minio/Dockerfile @@ -1,7 +1,7 @@ FROM minio/minio:latest LABEL \ - io.hass.version="1.0.1" \ + io.hass.version="1.0.2" \ io.hass.type="addon" \ io.hass.arch="aarch64|amd64" \ io.hass.name="MinIO" \ diff --git a/minio/README.md b/minio/README.md index 422d9e5..a95c39b 100644 --- a/minio/README.md +++ b/minio/README.md @@ -40,7 +40,7 @@ Once installed, access MinIO via the sidebar or at: ## 📂 Repository Structure ```bash -minio-addon/ +minio/ ├── config.json # Add-on definition ├── Dockerfile # MinIO container ├── run.sh # Entry point with TLS support and auto-creation of buckets diff --git a/minio/config.json b/minio/config.json index e292e63..a9f3533 100644 --- a/minio/config.json +++ b/minio/config.json @@ -1,6 +1,6 @@ { "name": "MinIO S3 Server", - "version": "1.0.1", + "version": "1.0.2", "slug": "minio", "description": "MinIO Server S3-compatible object storage server", "arch": [ diff --git a/minio/run.sh b/minio/run.sh index c82dff5..3a01b86 100644 --- a/minio/run.sh +++ b/minio/run.sh @@ -1,6 +1,14 @@ #!/usr/bin/env bash +echo "[DEBUG] Run script started.." set -e +# Read config from Home Assistant options +ACCESS_KEY=$(jq -r .access_key /data/options.json) +SECRET_KEY=$(jq -r .secret_key /data/options.json) +REGION=$(jq -r .region /data/options.json) +BUCKET=$(jq -r .bucket /data/options.json) + + # Config via HA options export MINIO_ROOT_USER="${ACCESS_KEY}" export MINIO_ROOT_PASSWORD="${SECRET_KEY}" @@ -17,7 +25,7 @@ DATA_DIR="/data" BUCKET="${BUCKET}" mkdir -p "$DATA_DIR/$BUCKET" -echo "[INFO] Starting MinIO with access: $ACCESS_KEY, region: $MINIO_REGION" +echo "[INFO] Starting MinIO with access: $MINIO_ROOT_USER, region: $MINIO_REGION" if [[ -f "$CERT_PATH" && -f "$KEY_PATH" ]]; then echo "[INFO] TLS cert found, starting in HTTPS mode" exec minio server $DATA_DIR --address ":9000" --console-address ":9001" --certs-dir /ssl