fix env-vars
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
FROM minio/minio:latest
|
FROM minio/minio:latest
|
||||||
|
|
||||||
LABEL \
|
LABEL \
|
||||||
io.hass.version="1.0.1" \
|
io.hass.version="1.0.2" \
|
||||||
io.hass.type="addon" \
|
io.hass.type="addon" \
|
||||||
io.hass.arch="aarch64|amd64" \
|
io.hass.arch="aarch64|amd64" \
|
||||||
io.hass.name="MinIO" \
|
io.hass.name="MinIO" \
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Once installed, access MinIO via the sidebar or at:
|
|||||||
## 📂 Repository Structure
|
## 📂 Repository Structure
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
minio-addon/
|
minio/
|
||||||
├── config.json # Add-on definition
|
├── config.json # Add-on definition
|
||||||
├── Dockerfile # MinIO container
|
├── Dockerfile # MinIO container
|
||||||
├── run.sh # Entry point with TLS support and auto-creation of buckets
|
├── run.sh # Entry point with TLS support and auto-creation of buckets
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "MinIO S3 Server",
|
"name": "MinIO S3 Server",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"slug": "minio",
|
"slug": "minio",
|
||||||
"description": "MinIO Server S3-compatible object storage server",
|
"description": "MinIO Server S3-compatible object storage server",
|
||||||
"arch": [
|
"arch": [
|
||||||
|
|||||||
10
minio/run.sh
10
minio/run.sh
@@ -1,6 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
echo "[DEBUG] Run script started.."
|
||||||
set -e
|
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
|
# Config via HA options
|
||||||
export MINIO_ROOT_USER="${ACCESS_KEY}"
|
export MINIO_ROOT_USER="${ACCESS_KEY}"
|
||||||
export MINIO_ROOT_PASSWORD="${SECRET_KEY}"
|
export MINIO_ROOT_PASSWORD="${SECRET_KEY}"
|
||||||
@@ -17,7 +25,7 @@ DATA_DIR="/data"
|
|||||||
BUCKET="${BUCKET}"
|
BUCKET="${BUCKET}"
|
||||||
mkdir -p "$DATA_DIR/$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
|
if [[ -f "$CERT_PATH" && -f "$KEY_PATH" ]]; then
|
||||||
echo "[INFO] TLS cert found, starting in HTTPS mode"
|
echo "[INFO] TLS cert found, starting in HTTPS mode"
|
||||||
exec minio server $DATA_DIR --address ":9000" --console-address ":9001" --certs-dir /ssl
|
exec minio server $DATA_DIR --address ":9000" --console-address ":9001" --certs-dir /ssl
|
||||||
|
|||||||
Reference in New Issue
Block a user