This commit is contained in:
Alexandre
2025-07-15 21:32:32 +02:00
parent add1fa3b20
commit 211bcc6556
7 changed files with 55 additions and 12 deletions

View File

@@ -74,11 +74,14 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && \ RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && \
/ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
ENTRYPOINT [ "/usr/bin/env" ]
CMD [ "/ha_entrypoint.sh" ]
# ---------- Healthcheck ---------- # ---------- Healthcheck ----------
ENV HEALTH_PORT="8080" \ #ENV HEALTH_PORT="8080" \
HEALTH_URL="/ping" # HEALTH_URL="/ping"
HEALTHCHECK --interval=10s --retries=5 --timeout=20s CMD \ #HEALTHCHECK --interval=10s --retries=5 --timeout=20s CMD \
curl -A "HealthCheck: Docker/1.0" -fs "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" || exit 1 # curl -A "HealthCheck: Docker/1.0" -fs "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" || exit 1
############ ############
# 5 Labels # # 5 Labels #

View File

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

View File

@@ -0,0 +1,15 @@
db:
host: "${DB_HOSTNAME}"
port: ${DB_PORT}
name: "${DB_DATABASE_NAME}"
user: "${DB_USERNAME}"
password: "${DB_PASSWORD}"
s3:
are_local_buckets: true
b2-eu-cen:
key: "${MINIO_ROOT_USER}"
secret: "${MINIO_ROOT_PASSWORD}"
endpoint: "http://localhost:3200"
region: "eu-central-2"
bucket: "${S3_BUCKET}"

View File

@@ -3,11 +3,16 @@
# shellcheck disable=SC2155,SC2016 # shellcheck disable=SC2155,SC2016
set -e set -e
bashio::log.info "Starting ente..." bashio::log.info "Starting services"
exec /usr/bin/museum &
bashio::log.info "Starting minio..." # Loop through each directory in /etc/services.d/
exec /usr/local/bin/minio server /data --address ":3200" & for dir in /etc/services.d/*; do
# Check if the directory contains a 'run' file
bashio::log.info "Starting ente-web..." if [ -f "$dir/run" ]; then
[ -n "$DISABLE_WEB_UI" ] || exec /usr/bin/ente-web # Execute the 'run' file
echo "Starting service in $dir"
bash "$dir/run"
else
echo "No run file found in $dir"
fi
done

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bash
set -e
CONFIG_FILE="/config/museum.yaml"
# Safety: refuse to start if the config file is missing
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "[museum] ERROR: $CONFIG_FILE not found" >&2
exit 1
fi
# Exec so that S6 can reap the PID
exec /usr/bin/museum --config "$CONFIG_FILE"

View File

@@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash
set -e
exec /usr/local/bin/minio server /data --address ":3200"

View File

@@ -0,0 +1,4 @@
#!/usr/bin/with-contenv bash
set -e
[[ "${DISABLE_WEB_UI,,}" == "true" ]] && exit 0
exec /usr/bin/ente-web