This commit is contained in:
Alexandre
2025-07-16 09:09:29 +02:00
committed by GitHub
parent 47a87d3f4f
commit a2ec42c05a
4 changed files with 55 additions and 1 deletions

View File

@@ -77,7 +77,7 @@
"startup": "services",
"udev": true,
"url": "https://github.com/alexbelgium/hassio-addons",
"version": "1.0.0test4",
"version": "1.0.0test5",
"video": true,
"webui": "http://[HOST]:[PORT:3000]"
}

View File

@@ -63,3 +63,22 @@ SQL
bashio::log.info "Internal Postgres ready."
done
#################
# Minio startup #
#################
MINIO_USER="$(bashio::config 'MINIO_ROOT_USER')"
MINIO_PASS="$(bashio::config 'MINIO_ROOT_PASSWORD')"
S3_BUCKET="$(bashio::config 'S3_BUCKET')"
bashio::log.info "Waiting for MinIO API…"
until /usr/local/bin/mc alias set h0 http://localhost:3200 "${MINIO_USER}" "${MINIO_PASS}" 2>/dev/null; do
sleep 1
done
bashio::log.info "Ensuring bucket ${S3_BUCKET} exists…"
/usr/local/bin/mc mb -p "h0/${S3_BUCKET}" || true
bashio::log.info "MinIO bucket ready."
sleep infinity

View File

@@ -0,0 +1,27 @@
#!/usr/bin/with-contenv bashio
set -euo pipefail
CFG=/config/museum.yaml
if ! bashio::fs.file_exists "$CFG"; then
bashio::log.error "$CFG not found; aborting museum start."
exit 1
fi
if bashio::config.true 'USE_EXTERNAL_DB'; then
DB_HOST="$(bashio::config 'DB_HOSTNAME')"
DB_PORT="$(bashio::config 'DB_PORT')"
DB_USER="$(bashio::config 'DB_USERNAME')"
bashio::log.info "Waiting for external Postgres at ${DB_HOST}:${DB_PORT}…"
until pg_isready -q -h "${DB_HOST}" -p "${DB_PORT}" -U "${DB_USER}"; do
sleep 2
done
else
DB_USER="postgres"
bashio::log.info "Waiting for internal Postgres…"
until pg_isready -q -h localhost -p 5432 -U "${DB_USER}"; do
sleep 2
done
fi
bashio::log.info "Starting museum."
exec /usr/bin/museum --config "$CFG"

View File

@@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bashio
set -euo pipefail
if bashio::config.true 'DISABLE_WEB_UI'; then
bashio::log.info "Web UI disabled by option."
exit 0
fi
bashio::log.info "Starting Ente web."
exec /usr/bin/ente-web