aggiunto minio
This commit is contained in:
6
MinIO/Dockerfile
Normal file
6
MinIO/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM minio/minio:latest
|
||||
|
||||
COPY run.sh /usr/local/bin/run.sh
|
||||
RUN chmod +x /usr/local/bin/run.sh
|
||||
|
||||
CMD ["/usr/local/bin/run.sh"]
|
||||
70
MinIO/README.md
Normal file
70
MinIO/README.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# MinIO Add-on per Home Assistant
|
||||
|
||||
Questo add-on fornisce un server **S3 compatibile** basato su MinIO, perfetto per:
|
||||
|
||||
- Backup di **Longhorn**
|
||||
- Archiviazione file/media
|
||||
- Logging o integrazioni custom
|
||||
|
||||
È stato progettato per essere **production-ready**, sicuro, leggero e accessibile direttamente via pannello laterale di Home Assistant.
|
||||
|
||||
## ⚙️ Configurazione
|
||||
|
||||
```yaml
|
||||
access_key: admin
|
||||
secret_key: CHANGEME-strong-password
|
||||
region: us-east-1
|
||||
bucket: longhorn-backup
|
||||
```
|
||||
|
||||
## 🌐 Accesso
|
||||
|
||||
Una volta installato, accedi a MinIO tramite il pannello laterale o all'indirizzo:
|
||||
|
||||
`http://<ip_hass>:9000` (se Ingress non è disponibile)
|
||||
|
||||
## 🚀 Installazione
|
||||
|
||||
1. Vai su Home Assistant → **Supervisor → Add-on Store**
|
||||
2. Aggiungi la tua repo Git custom (Settings → Repositories → `https://github.com/<tuo-utente>/minio-addon`)
|
||||
3. Installa l’add-on, avvia e accedi a MinIO via Ingress
|
||||
|
||||
## 🧾 Requisiti
|
||||
|
||||
- Home Assistant OS o Supervised
|
||||
- Architettura supportata: `amd64`, `aarch64`
|
||||
- Accesso a una cartella persistente per `/data`
|
||||
|
||||
## 📂 Struttura del repository
|
||||
|
||||
```bash
|
||||
minio-addon/
|
||||
├── config.json # Definizione dell’add-on
|
||||
├── Dockerfile # Contenitore MinIO
|
||||
├── run.sh # Entrypoint con supporto TLS e bucket auto-creation
|
||||
├── README.md
|
||||
└── ...
|
||||
```
|
||||
|
||||
## 🧠 Note
|
||||
Il bucket specificato in bucket: viene creato automaticamente se non esiste
|
||||
|
||||
Se usi Longhorn, puoi puntare i backup a:
|
||||
|
||||
```bash
|
||||
http://<IP_HASS>:9000/longhorn-backup
|
||||
```
|
||||
Le credenziali vengono passate come variabili d'ambiente in fase di bootstrap
|
||||
|
||||
## 🛡 Sicurezza
|
||||
> ⚠️ Usa sempre password forti.
|
||||
|
||||
Considera l’attivazione del TLS automatico posizionando i certificati in `/ssl/`.
|
||||
|
||||
## ✅ TODO futuri
|
||||
- Supporto per versioning bucket
|
||||
- Healthcheck e metriche Prometheus
|
||||
- Interfaccia per gestione utenti/bucket via opzioni
|
||||
|
||||
---
|
||||
Realizzato con ❤️ per l’automazione e la resilienza.
|
||||
34
MinIO/config.json
Normal file
34
MinIO/config.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "MinIO S3 Server",
|
||||
"version": "1.0.0",
|
||||
"slug": "minio",
|
||||
"description": "Production-ready S3-compatible object storage server for HA and Longhorn",
|
||||
"arch": ["amd64", "aarch64"],
|
||||
"startup": "services",
|
||||
"boot": "auto",
|
||||
"hassio_api": false,
|
||||
"host_network": false,
|
||||
"panel_icon": "mdi:database",
|
||||
"panel_title": "MinIO",
|
||||
"ingress": true,
|
||||
"ingress_port": 9001,
|
||||
"ingress_stream": false,
|
||||
"ports": {
|
||||
"9000/tcp": 9000,
|
||||
"9001/tcp": 9001
|
||||
},
|
||||
"map": ["config:rw", "ssl:rw"],
|
||||
"options": {
|
||||
"access_key": "admin",
|
||||
"secret_key": "CHANGEME-strong-password",
|
||||
"region": "us-east-1",
|
||||
"bucket": "longhorn-backup"
|
||||
},
|
||||
"schema": {
|
||||
"access_key": "str",
|
||||
"secret_key": "str",
|
||||
"region": "str",
|
||||
"bucket": "str"
|
||||
},
|
||||
"image": "docker.io/minio/minio:latest"
|
||||
}
|
||||
BIN
MinIO/icon.png
Normal file
BIN
MinIO/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
MinIO/logo.png
Normal file
BIN
MinIO/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
27
MinIO/run.sh
Normal file
27
MinIO/run.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Config via HA options
|
||||
export MINIO_ROOT_USER="${ACCESS_KEY}"
|
||||
export MINIO_ROOT_PASSWORD="${SECRET_KEY}"
|
||||
export MINIO_REGION="${REGION:-us-east-1}"
|
||||
|
||||
# TLS support (optional, autodetect)
|
||||
CERT_PATH="/ssl/cert.pem"
|
||||
KEY_PATH="/ssl/key.pem"
|
||||
|
||||
# Data path
|
||||
DATA_DIR="/data"
|
||||
|
||||
# First-run: make sure bucket exists (done via client)
|
||||
BUCKET="${BUCKET}"
|
||||
mkdir -p "$DATA_DIR/$BUCKET"
|
||||
|
||||
echo "[INFO] Starting MinIO with access: $ACCESS_KEY, 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
|
||||
else
|
||||
echo "[INFO] Starting in HTTP mode"
|
||||
exec minio server $DATA_DIR --address ":9000" --console-address ":9001"
|
||||
fi
|
||||
Reference in New Issue
Block a user