mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Compare commits
10 Commits
6e703632ed
...
2ce9499b46
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ce9499b46 | ||
|
|
63245a8698 | ||
|
|
ecbb75b209 | ||
|
|
b1673798f6 | ||
|
|
afe85f3ef2 | ||
|
|
f7c04b55fb | ||
|
|
c181738ff1 | ||
|
|
2686ea64f8 | ||
|
|
b833d9fd3c | ||
|
|
7debca49fe |
@@ -22,15 +22,8 @@ FROM ${BUILD_FROM}
|
||||
# 2 Modify Image #
|
||||
##################
|
||||
|
||||
# Set S6 wait time
|
||||
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# Global LSIO modifications
|
||||
#ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh"
|
||||
#ARG CONFIGLOCATION="/config/addons_config/netalertx"
|
||||
#RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
|
||||
ENV NETALERTX_DATA=/config
|
||||
ENV READ_WRITE_FOLDERS="$READ_WRITE_FOLDERS $NETALERTX_DATA"
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
@@ -38,48 +31,19 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
|
||||
# Add rootfs
|
||||
COPY rootfs/ /
|
||||
|
||||
USER 0
|
||||
|
||||
# Uses /bin for compatibility purposes
|
||||
# hadolint ignore=DL4005
|
||||
RUN if [ ! -f /bin/sh ] && [ -f /usr/bin/sh ]; then ln -s /usr/bin/sh /bin/sh; fi && \
|
||||
if [ ! -f /bin/bash ] && [ -f /usr/bin/bash ]; then ln -s /usr/bin/bash /bin/bash; fi
|
||||
|
||||
# Modules
|
||||
ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh"
|
||||
|
||||
# Automatic modules download
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh"
|
||||
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
|
||||
|
||||
# Manual apps
|
||||
ENV PACKAGES=""
|
||||
|
||||
# Automatic apps & bashio
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
||||
RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
|
||||
|
||||
################
|
||||
# 4 Entrypoint #
|
||||
################
|
||||
|
||||
# Add entrypoint
|
||||
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
|
||||
|
||||
# Entrypoint modifications
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh"
|
||||
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
|
||||
|
||||
# Standalone bashio command
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/bashio-standalone.sh" "/.bashio-standalone.sh"
|
||||
RUN chmod 777 /.bashio-standalone.sh
|
||||
|
||||
#WORKDIR /
|
||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||
#CMD [ "/ha_entrypoint.sh" ]
|
||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN chown 102:102 /etc/cont-init.d/* && \
|
||||
chmod +x /etc/cont-init.d/* && \
|
||||
\
|
||||
# Install bashio
|
||||
BASHIO_VERSION="0.14.3" && \
|
||||
mkdir -p /tmp/bashio && \
|
||||
curl -f -L -s -S "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar -xzf - --strip 1 -C /tmp/bashio && \
|
||||
mv /tmp/bashio/lib /usr/lib/bashio && \
|
||||
ln -s /usr/lib/bashio/bashio /usr/bin/bashio && \
|
||||
rm -rf /tmp/bashio && \
|
||||
\
|
||||
# Install packages
|
||||
apk add jq
|
||||
|
||||
############
|
||||
# 5 Labels #
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"build_from": {
|
||||
"aarch64": "ghcr.io/jokob-sk/netalertx:25.5.24",
|
||||
"amd64": "ghcr.io/jokob-sk/netalertx:25.5.24"
|
||||
"aarch64": "ghcr.io/jokob-sk/netalertx:latest",
|
||||
"amd64": "ghcr.io/jokob-sk/netalertx:latest"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ environment:
|
||||
PORT: "20211"
|
||||
PUID: "102"
|
||||
TZ: Europe/Berlin
|
||||
SKIP_STARTUP_CHECKS: "true"
|
||||
hassio_api: true
|
||||
host_network: true
|
||||
image: ghcr.io/alexbelgium/netalertx-{arch}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"repository": "alexbelgium/hassio-addons",
|
||||
"slug": "netalertx",
|
||||
"source": "github",
|
||||
"paused": true,
|
||||
"upstream_repo": "jokob-sk/NetAlertX",
|
||||
"upstream_version": "25.5.24"
|
||||
"upstream_version": "25.11.29"
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
- Added support for configuring extra environment variables via the `env_vars` add-on option alongside config.yaml. See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details.
|
||||
|
||||
## 12.0.15 (18-12-2025)
|
||||
- Normalize `SERVICE_URL` and `FILE_SERVER_ROOT` values in `conf/seahub_settings.py` based on the add-on configuration to generate valid download links.
|
||||
|
||||
## 12.0.14 (13-09-2025)
|
||||
- Update to latest version from franchetti/seafile-arm
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ Webui can be found at <http://homeassistant:8000> (Seahub) and <http://homeassis
|
||||
3. Configure database (SQLite default, MariaDB recommended for production)
|
||||
4. Set proper file server root URL for external access
|
||||
|
||||
> **File server URL**: The add-on now writes `SERVICE_URL` and `FILE_SERVER_ROOT` directly to `conf/seahub_settings.py`. `SERVICE_URL` uses the `url` option when set (otherwise `SERVER_IP` with port `8000`), while `FILE_SERVER_ROOT` follows the `FILE_SERVER_ROOT` option (defaulting to `http://<your host>:8082`). Keep `FILE_SERVER_ROOT` aligned with your accessible file server endpoint so download links resolve correctly.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
|
||||
@@ -128,5 +128,5 @@ services:
|
||||
slug: seafile
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/seafile
|
||||
version: 12.0.14
|
||||
version: 12.0.15
|
||||
webui: http://[HOST]:[PORT:8000]
|
||||
|
||||
@@ -65,6 +65,54 @@ sed -i "s|/shared|$DATA_LOCATION|g" /docker_entrypoint.sh
|
||||
sed -i "s|/shared|$DATA_LOCATION|g" /home/seafile/*.sh
|
||||
#sed -i "s=cp -r ./media $DATA_LOCATION/=chown -R seafile:seafile $DATA_LOCATION/* && chmod -R 777 $DATA_LOCATION/media && cp -rnf ./media/. $DATA_LOCATION/media ||true=g" /home/seafile/*.sh
|
||||
|
||||
#############################################
|
||||
# Configure service URL and file server root #
|
||||
#############################################
|
||||
|
||||
bashio::log.info "Configuring Seafile URLs"
|
||||
|
||||
SERVER_IP_CONFIG=$(bashio::config 'SERVER_IP')
|
||||
SERVICE_URL_CONFIG=$(bashio::config 'url')
|
||||
FILE_SERVER_ROOT_CONFIG=$(bashio::config 'FILE_SERVER_ROOT')
|
||||
FILE_PORT_CONFIG=$(bashio::config 'PORT')
|
||||
|
||||
DEFAULT_HOST=${SERVER_IP_CONFIG:-homeassistant.local}
|
||||
DEFAULT_FILE_PORT=${FILE_PORT_CONFIG:-8082}
|
||||
|
||||
normalize_url() {
|
||||
local raw_url="${1%/}"
|
||||
local default_scheme="$2"
|
||||
|
||||
if [[ -z "${raw_url}" || "${raw_url}" == "null" ]]; then
|
||||
echo ""
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "${raw_url}" =~ ^https?:// ]]; then
|
||||
echo "${raw_url}"
|
||||
else
|
||||
echo "${default_scheme}://${raw_url}"
|
||||
fi
|
||||
}
|
||||
|
||||
SERVICE_URL_VALUE=$(normalize_url "${SERVICE_URL_CONFIG:-${DEFAULT_HOST}:8000}" "http")
|
||||
FILE_SERVER_ROOT_VALUE=$(normalize_url "${FILE_SERVER_ROOT_CONFIG:-${DEFAULT_HOST}:${DEFAULT_FILE_PORT}}" "http")
|
||||
|
||||
SEAHUB_SETTINGS_FILE="${DATA_LOCATION}/conf/seahub_settings.py"
|
||||
mkdir -p "$(dirname "${SEAHUB_SETTINGS_FILE}")"
|
||||
touch "${SEAHUB_SETTINGS_FILE}"
|
||||
|
||||
sed -i '/^SERVICE_URL *=/d' "${SEAHUB_SETTINGS_FILE}"
|
||||
sed -i '/^FILE_SERVER_ROOT *=/d' "${SEAHUB_SETTINGS_FILE}"
|
||||
|
||||
{
|
||||
echo "SERVICE_URL = \"${SERVICE_URL_VALUE}\""
|
||||
echo "FILE_SERVER_ROOT = \"${FILE_SERVER_ROOT_VALUE}\""
|
||||
} >> "${SEAHUB_SETTINGS_FILE}"
|
||||
|
||||
bashio::log.info "SERVICE_URL set to ${SERVICE_URL_VALUE}"
|
||||
bashio::log.info "FILE_SERVER_ROOT set to ${FILE_SERVER_ROOT_VALUE}"
|
||||
|
||||
###################
|
||||
# Define database #
|
||||
###################
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"github_fulltag": "true",
|
||||
"last_update": "13-09-2025",
|
||||
"last_update": "18-12-2025",
|
||||
"paused": false,
|
||||
"repository": "alexbelgium/hassio-addons",
|
||||
"slug": "seafile",
|
||||
|
||||
Reference in New Issue
Block a user