fix(minio): update description, version, and add drive parameter support

This commit is contained in:
2025-05-06 09:18:06 +02:00
parent e8421beff3
commit 83890aaf5d
4 changed files with 27 additions and 11 deletions

View File

@@ -1,10 +1,10 @@
FROM alpine:3.18 FROM alpine:3.18
LABEL io.hass.name="MinIO" LABEL io.hass.name="MinIO"
LABEL io.hass.description="S3-compatible object storage for HA" LABEL io.hass.description="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service."
LABEL io.hass.arch="amd64|aarch64" LABEL io.hass.arch="amd64|aarch64"
LABEL io.hass.type="addon" LABEL io.hass.type="addon"
LABEL io.hass.version="1.1.0" LABEL io.hass.version="1.1.1"
# Install curl, jq and ca-certificates # Install curl, jq and ca-certificates
RUN apk add --no-cache bash curl jq ca-certificates RUN apk add --no-cache bash curl jq ca-certificates

View File

@@ -15,8 +15,17 @@ It is designed to be **production-ready**, secure, lightweight, and accessible d
```yaml ```yaml
access_key: admin access_key: admin
secret_key: CHANGEME-strong-password secret_key: CHANGEME-strong-password
drive: storage
``` ```
### Parameters
| Variable | Default | Description |
|-----------------|-------------|-------------------------------------------------------|
| `access_key` | `admin` | MinIO user credential |
| `secret_key` | `admin` | MinIO password credential |
| `drive` | `storage` | Folder where MinIO data will be saved inside `/data` |
## 🚀 Installation ## 🚀 Installation
1. Go to Home Assistant → **Supervisor → Add-on Store** 1. Go to Home Assistant → **Supervisor → Add-on Store**
@@ -55,11 +64,6 @@ The container is based on `alpine:3.18` image
Consider enabling automatic TLS by placing certificates in `/ssl/`. Consider enabling automatic TLS by placing certificates in `/ssl/`.
## ✅ Future TODOs
- Support for bucket versioning
- Healthcheck and Prometheus metrics
- Interface for managing users/buckets via options
## Changelog & Releases ## Changelog & Releases
Releases are based on [Semantic Versioning][semver], and use the format Releases are based on [Semantic Versioning][semver], and use the format

View File

@@ -1,6 +1,6 @@
{ {
"name": "MinIO S3 Server", "name": "MinIO",
"version": "1.1.0", "version": "1.1.1",
"slug": "minio", "slug": "minio",
"description": "MinIO Server S3-compatible object storage server", "description": "MinIO Server S3-compatible object storage server",
"arch": [ "arch": [
@@ -8,6 +8,7 @@
"aarch64" "aarch64"
], ],
"startup": "services", "startup": "services",
"url": "https://github.com/martemme/HomeAssistantAddons/tree/main/minio",
"boot": "auto", "boot": "auto",
"hassio_api": false, "hassio_api": false,
"init": false, "init": false,
@@ -19,17 +20,25 @@
"9000/tcp": 9000, "9000/tcp": 9000,
"9001/tcp": 9001 "9001/tcp": 9001
}, },
"ports_description": {
"9000/tcp": "Web Interface",
"9001/tcp": "Web Console"
},
"webui": "[PROTO:ssl]://[HOST]:[PORT:9000]",
"map": { "map": {
"config": "rw", "config": "rw",
"share": "rw",
"ssl": "rw" "ssl": "rw"
}, },
"options": { "options": {
"access_key": "admin", "access_key": "admin",
"secret_key": "CHANGEME-strong-password" "secret_key": "CHANGEME-strong-password",
"drive": "storage"
}, },
"schema": { "schema": {
"access_key": "str", "access_key": "str",
"secret_key": "str" "secret_key": "str",
"drive": "str"
}, },
"build_from": { "build_from": {
"amd64": "alpine:3.18", "amd64": "alpine:3.18",

View File

@@ -8,8 +8,10 @@ CONFIG="/data/options.json"
# The file is created by the Home Assistant Add-on system # The file is created by the Home Assistant Add-on system
# and contains the configuration options defined in the add-on config.json file # and contains the configuration options defined in the add-on config.json file
# The jq command is used to parse the JSON file and extract the values # The jq command is used to parse the JSON file and extract the values
# the drive variable is used to specify the location of the MinIO data directory inside /data
ACCESS_KEY=$(jq -r .access_key "$CONFIG") ACCESS_KEY=$(jq -r .access_key "$CONFIG")
SECRET_KEY=$(jq -r .secret_key "$CONFIG") SECRET_KEY=$(jq -r .secret_key "$CONFIG")
DRIVE=$(jq -r .drive "$CONFIG")
# Configure MinIO environment variables # Configure MinIO environment variables
# These variables are used to set up the MinIO server # These variables are used to set up the MinIO server
@@ -18,6 +20,7 @@ export MINIO_ROOT_USER="$ACCESS_KEY"
export MINIO_ROOT_PASSWORD="$SECRET_KEY" export MINIO_ROOT_PASSWORD="$SECRET_KEY"
# Check if the bucket exists, if not create it # Check if the bucket exists, if not create it
DATA_DIR="/data/$DRIVE"
mkdir -p /data mkdir -p /data
echo "[INFO] Starting MinIO (user: $MINIO_ROOT_USER)" echo "[INFO] Starting MinIO (user: $MINIO_ROOT_USER)"