mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
test2
This commit is contained in:
@@ -74,11 +74,14 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
|
||||
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && \
|
||||
/ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/env" ]
|
||||
CMD [ "/ha_entrypoint.sh" ]
|
||||
|
||||
# ---------- Healthcheck ----------
|
||||
ENV HEALTH_PORT="8080" \
|
||||
HEALTH_URL="/ping"
|
||||
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
|
||||
#ENV HEALTH_PORT="8080" \
|
||||
# HEALTH_URL="/ping"
|
||||
#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
|
||||
|
||||
############
|
||||
# 5 Labels #
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
"startup": "services",
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"version": "1.0.0test",
|
||||
"version": "1.0.0test2",
|
||||
"video": true,
|
||||
"webui": "http://[HOST]:[PORT:3000]"
|
||||
}
|
||||
|
||||
15
ente/rootfs/etc/config/museum.yaml
Normal file
15
ente/rootfs/etc/config/museum.yaml
Normal 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}"
|
||||
@@ -3,11 +3,16 @@
|
||||
# shellcheck disable=SC2155,SC2016
|
||||
set -e
|
||||
|
||||
bashio::log.info "Starting ente..."
|
||||
exec /usr/bin/museum &
|
||||
bashio::log.info "Starting services"
|
||||
|
||||
bashio::log.info "Starting minio..."
|
||||
exec /usr/local/bin/minio server /data --address ":3200" &
|
||||
|
||||
bashio::log.info "Starting ente-web..."
|
||||
[ -n "$DISABLE_WEB_UI" ] || exec /usr/bin/ente-web
|
||||
# Loop through each directory in /etc/services.d/
|
||||
for dir in /etc/services.d/*; do
|
||||
# Check if the directory contains a 'run' file
|
||||
if [ -f "$dir/run" ]; then
|
||||
# Execute the 'run' file
|
||||
echo "Starting service in $dir"
|
||||
bash "$dir/run"
|
||||
else
|
||||
echo "No run file found in $dir"
|
||||
fi
|
||||
done
|
||||
|
||||
13
ente/rootfs/etc/services.d/01-museum/run
Normal file
13
ente/rootfs/etc/services.d/01-museum/run
Normal 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"
|
||||
3
ente/rootfs/etc/services.d/02-minio/run
Normal file
3
ente/rootfs/etc/services.d/02-minio/run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
set -e
|
||||
exec /usr/local/bin/minio server /data --address ":3200"
|
||||
4
ente/rootfs/etc/services.d/03-web/run
Normal file
4
ente/rootfs/etc/services.d/03-web/run
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
set -e
|
||||
[[ "${DISABLE_WEB_UI,,}" == "true" ]] && exit 0
|
||||
exec /usr/bin/ente-web
|
||||
Reference in New Issue
Block a user