Compare commits
2 Commits
1669f63f21
...
codex/fix-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d052e7eb3 | ||
|
|
77b01d9491 |
BIN
.github/stargazer_map.png
vendored
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 330 KiB |
BIN
.github/stats.png
vendored
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
.github/stats_addons.png
vendored
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 9.7 KiB |
14
README.md
@@ -817,13 +817,6 @@ If you want to do add the repository manually, please follow the procedure highl
|
|||||||
![aarch64][aarch64-badge]
|
![aarch64][aarch64-badge]
|
||||||
![amd64][amd64-badge]
|
![amd64][amd64-badge]
|
||||||
|
|
||||||
✓ [Vaultwarden](bitwarden/) : Open source password management solution
|
|
||||||
|
|
||||||
  
|
|
||||||

|
|
||||||
![aarch64][aarch64-badge]
|
|
||||||
![amd64][amd64-badge]
|
|
||||||
|
|
||||||
✓  [Webtop KDE](webtop_kde/) : Full linux desktop environment accessible via any modern web browser
|
✓  [Webtop KDE](webtop_kde/) : Full linux desktop environment accessible via any modern web browser
|
||||||
|
|
||||||
  
|
  
|
||||||
@@ -915,6 +908,13 @@ If you want to do add the repository manually, please follow the procedure highl
|
|||||||
![aarch64][aarch64-badge]
|
![aarch64][aarch64-badge]
|
||||||
![amd64][amd64-badge]
|
![amd64][amd64-badge]
|
||||||
|
|
||||||
|
✓ [zzz_archived - Vaultwarden](zzz_archived_bitwarden/) : Deprecated - please use community version
|
||||||
|
|
||||||
|
  
|
||||||
|

|
||||||
|
![aarch64][aarch64-badge]
|
||||||
|
![amd64][amd64-badge]
|
||||||
|
|
||||||
✓ [zzz_archived : Code-server (VScode)](zzz_archived_code-server/) : Deprecated : Code-server is VS Code running on a remote server, accessible through the browser
|
✓ [zzz_archived : Code-server (VScode)](zzz_archived_code-server/) : Deprecated : Code-server is VS Code running on a remote server, accessible through the browser
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
baikal/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
bazarr/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
codex/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
emby/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
ente/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
gitea/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
grav/stats.png
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
inadyn/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
joal/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -104,5 +104,5 @@ schema:
|
|||||||
slug: joplin
|
slug: joplin
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons
|
url: https://github.com/alexbelgium/hassio-addons
|
||||||
version: 3.5.2-2
|
version: 3.5.2-3
|
||||||
webui: "[PROTO:ssl]://[HOST]:[PORT:22300]"
|
webui: "[PROTO:ssl]://[HOST]:[PORT:22300]"
|
||||||
|
|||||||
@@ -42,6 +42,40 @@ unlock_sqlite_migrations() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repair_notifications_migration_sqlite() {
|
||||||
|
local db_path="$1"
|
||||||
|
|
||||||
|
if ! command -v sqlite3 >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$db_path" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local has_notifications
|
||||||
|
has_notifications="$(sqlite3 "$db_path" "SELECT 1 FROM sqlite_master WHERE type='table' AND name='notifications' LIMIT 1;" 2>/dev/null || true)"
|
||||||
|
[[ "$has_notifications" == "1" ]] || return 0
|
||||||
|
|
||||||
|
local has_migrations
|
||||||
|
has_migrations="$(sqlite3 "$db_path" "SELECT 1 FROM sqlite_master WHERE type='table' AND name='knex_migrations' LIMIT 1;" 2>/dev/null || true)"
|
||||||
|
[[ "$has_migrations" == "1" ]] || return 0
|
||||||
|
|
||||||
|
local has_entry
|
||||||
|
has_entry="$(sqlite3 "$db_path" "SELECT 1 FROM knex_migrations WHERE name='20203012152842_notifications.js' LIMIT 1;" 2>/dev/null || true)"
|
||||||
|
[[ "$has_entry" == "1" ]] && return 0
|
||||||
|
|
||||||
|
bashio::log.warning "Notifications table exists but migration is missing; repairing knex_migrations entry."
|
||||||
|
sqlite3 "$db_path" "
|
||||||
|
PRAGMA busy_timeout=5000;
|
||||||
|
INSERT INTO knex_migrations(name, batch, migration_time)
|
||||||
|
VALUES ('20203012152842_notifications.js',
|
||||||
|
COALESCE((SELECT MAX(batch) FROM knex_migrations), 1),
|
||||||
|
CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
" >/dev/null 2>&1 || bashio::log.warning "Failed to repair notifications migration entry."
|
||||||
|
}
|
||||||
|
|
||||||
unlock_postgres_migrations() {
|
unlock_postgres_migrations() {
|
||||||
if ! command -v psql >/dev/null 2>&1; then
|
if ! command -v psql >/dev/null 2>&1; then
|
||||||
bashio::log.warning "psql not available; skipping PostgreSQL migration lock check."
|
bashio::log.warning "psql not available; skipping PostgreSQL migration lock check."
|
||||||
@@ -81,6 +115,47 @@ unlock_postgres_migrations() {
|
|||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repair_notifications_migration_postgres() {
|
||||||
|
if ! command -v psql >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${POSTGRES_DATABASE:-}" || -z "${POSTGRES_USER:-}" || -z "${POSTGRES_HOST:-}" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local pg_port="${POSTGRES_PORT:-5432}"
|
||||||
|
export PGPASSWORD="${POSTGRES_PASSWORD:-}"
|
||||||
|
|
||||||
|
local has_notifications
|
||||||
|
has_notifications="$(psql -h "$POSTGRES_HOST" -p "$pg_port" -U "$POSTGRES_USER" -d "$POSTGRES_DATABASE" -Atqc \
|
||||||
|
"SELECT 1 FROM information_schema.tables WHERE table_name='notifications' LIMIT 1;" 2>/dev/null || true)"
|
||||||
|
[[ "$has_notifications" == "1" ]] || { unset PGPASSWORD; return 0; }
|
||||||
|
|
||||||
|
local has_migrations
|
||||||
|
has_migrations="$(psql -h "$POSTGRES_HOST" -p "$pg_port" -U "$POSTGRES_USER" -d "$POSTGRES_DATABASE" -Atqc \
|
||||||
|
"SELECT 1 FROM information_schema.tables WHERE table_name='knex_migrations' LIMIT 1;" 2>/dev/null || true)"
|
||||||
|
[[ "$has_migrations" == "1" ]] || { unset PGPASSWORD; return 0; }
|
||||||
|
|
||||||
|
local has_entry
|
||||||
|
has_entry="$(psql -h "$POSTGRES_HOST" -p "$pg_port" -U "$POSTGRES_USER" -d "$POSTGRES_DATABASE" -Atqc \
|
||||||
|
"SELECT 1 FROM knex_migrations WHERE name='20203012152842_notifications.js' LIMIT 1;" 2>/dev/null || true)"
|
||||||
|
[[ "$has_entry" == "1" ]] && { unset PGPASSWORD; return 0; }
|
||||||
|
|
||||||
|
bashio::log.warning "Notifications table exists but migration is missing; repairing knex_migrations entry."
|
||||||
|
psql -h "$POSTGRES_HOST" -p "$pg_port" -U "$POSTGRES_USER" -d "$POSTGRES_DATABASE" -Atqc \
|
||||||
|
"INSERT INTO knex_migrations(name, batch, migration_time)
|
||||||
|
SELECT '20203012152842_notifications.js',
|
||||||
|
COALESCE(MAX(batch), 1),
|
||||||
|
NOW()
|
||||||
|
FROM knex_migrations
|
||||||
|
WHERE NOT EXISTS (
|
||||||
|
SELECT 1 FROM knex_migrations WHERE name='20203012152842_notifications.js'
|
||||||
|
);" >/dev/null 2>&1 || bashio::log.warning "Failed to repair notifications migration entry."
|
||||||
|
|
||||||
|
unset PGPASSWORD
|
||||||
|
}
|
||||||
|
|
||||||
# -------------------
|
# -------------------
|
||||||
# Data location
|
# Data location
|
||||||
# -------------------
|
# -------------------
|
||||||
@@ -117,9 +192,11 @@ if bashio::config.has_value 'POSTGRES_DATABASE'; then
|
|||||||
bashio::config.has_value 'POSTGRES_HOST' && export POSTGRES_HOST="$(bashio::config 'POSTGRES_HOST')"
|
bashio::config.has_value 'POSTGRES_HOST' && export POSTGRES_HOST="$(bashio::config 'POSTGRES_HOST')"
|
||||||
|
|
||||||
unlock_postgres_migrations
|
unlock_postgres_migrations
|
||||||
|
repair_notifications_migration_postgres
|
||||||
else
|
else
|
||||||
bashio::log.info "Using sqlite"
|
bashio::log.info "Using sqlite"
|
||||||
unlock_sqlite_migrations "$SQLITE_DATABASE"
|
unlock_sqlite_migrations "$SQLITE_DATABASE"
|
||||||
|
repair_notifications_migration_sqlite "$SQLITE_DATABASE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -------------------
|
# -------------------
|
||||||
|
|||||||
BIN
joplin/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
kometa/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
lidarr/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -1,5 +1,3 @@
|
|||||||
## v3.8.0-2 (29-12-2025)
|
|
||||||
- Minor bugs fixed
|
|
||||||
|
|
||||||
## v3.8.0 (20-12-2025)
|
## v3.8.0 (20-12-2025)
|
||||||
- Update to latest version from mealie-recipes/mealie (changelog : https://github.com/mealie-recipes/mealie/releases)
|
- Update to latest version from mealie-recipes/mealie (changelog : https://github.com/mealie-recipes/mealie/releases)
|
||||||
|
|||||||
@@ -114,4 +114,4 @@ schema:
|
|||||||
slug: mealie
|
slug: mealie
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons
|
url: https://github.com/alexbelgium/hassio-addons
|
||||||
version: v3.8.0-2
|
version: "v3.8.0"
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
sub_filter '`/api' '`%%ingress_entry%%/api';
|
sub_filter '`/api' '`%%ingress_entry%%/api';
|
||||||
sub_filter "'/api" "'%%ingress_entry%%/api";
|
sub_filter "'/api" "'%%ingress_entry%%/api";
|
||||||
sub_filter %%base_subpath%% %%ingress_entry%%/;
|
sub_filter %%base_subpath%% %%ingress_entry%%/;
|
||||||
sub_filter recipes/releases/tag recipes/mealie/releases/tag;
|
|
||||||
sub_filter 'href="/"' 'href="%%ingress_entry%%/"';
|
sub_filter 'href="/"' 'href="%%ingress_entry%%/"';
|
||||||
sub_filter '"\/"' '"%%ingress_entry%%\/"';
|
sub_filter '"\/"' '"%%ingress_entry%%\/"';
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
mealie/stats.png
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
monica/stats.png
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
mylar3/stats.png
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
nzbget/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
omada/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
ombi/stats.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
piwigo/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
plex/stats.png
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -1,9 +1,3 @@
|
|||||||
## alpine-sts-bashio-fix (29-12-2025)
|
|
||||||
|
|
||||||
- Fix: PROTECTION MODE IS ENABLED error when protection mode is OFF (Fixes #2307)
|
|
||||||
- Update bashio from v0.17.5 → main branch for improved API error handling
|
|
||||||
- Add robust protection mode check with Docker socket fallback
|
|
||||||
- Tested and verified working on Home Assistant OS
|
|
||||||
|
|
||||||
## alpine-sts (24-12-2025)
|
## alpine-sts (24-12-2025)
|
||||||
- Update to latest version from portainer/agent
|
- Update to latest version from portainer/agent
|
||||||
|
|||||||
@@ -1,112 +1,149 @@
|
|||||||
# Portainer Agent with bashio main + simplified protection mode check
|
#============================#
|
||||||
# Fix for: FATAL: PROTECTION MODE IS ENABLED! error when protection mode is OFF
|
# ALEXBELGIUM'S DOCKERFILE #
|
||||||
# Approach: Level 1 (standard bashio) + Level 2 (socket fallback)
|
#============================#
|
||||||
|
# _.------.
|
||||||
|
# _.-` ('>.-`"alpine-sts""-.
|
||||||
|
# '.--'` _'` _ .--.)
|
||||||
|
# -' '-.-';` `
|
||||||
|
# ' - _.' ``'--.
|
||||||
|
# '---` .-'"alpine-sts"`
|
||||||
|
# /`
|
||||||
|
#=== Home Assistant Addon ===#
|
||||||
|
|
||||||
|
#################
|
||||||
|
# 1 Build Image #
|
||||||
|
#################
|
||||||
|
|
||||||
|
# Must be declared before first FROM
|
||||||
ARG BUILD_FROM
|
ARG BUILD_FROM
|
||||||
ARG BUILD_ARCH
|
|
||||||
|
# Get agent
|
||||||
|
FROM portainer/agent:alpine as original_agent
|
||||||
|
ENV PORTAINER_AGENT_ARGS="alpine-sts"
|
||||||
|
|
||||||
|
# Build using base
|
||||||
FROM $BUILD_FROM
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
# Step 1: Replace bashio v0.17.5 with main branch for improved API error handling
|
# Copy Portainer agent binaries
|
||||||
RUN rm -rf /usr/lib/bashio /usr/bin/bashio && \
|
COPY --from=original_agent /app /app
|
||||||
curl -J -L -o /tmp/bashio.tar.gz \
|
|
||||||
"https://github.com/hassio-addons/bashio/archive/main.tar.gz" && \
|
|
||||||
mkdir /tmp/bashio && \
|
|
||||||
tar -xzf /tmp/bashio.tar.gz --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 /tmp/bashio.tar.gz
|
|
||||||
|
|
||||||
# Step 2: Get agent from official image
|
# Add tzdata
|
||||||
COPY --from=ghcr.io/alexbelgium/portainer_agent-${BUILD_ARCH}:alpine-sts /app /app
|
|
||||||
|
|
||||||
# Step 3: Add tzdata and timezone support
|
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip /zoneinfo.zip
|
ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip /zoneinfo.zip
|
||||||
ENV ZONEINFO /zoneinfo.zip
|
ENV ZONEINFO /zoneinfo.zip
|
||||||
|
|
||||||
# Step 4: Set S6 init system wait times
|
##################
|
||||||
|
# 2 Modify Image #
|
||||||
|
##################
|
||||||
|
|
||||||
|
# Set S6 wait time
|
||||||
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||||
S6_SERVICES_GRACETIME=0
|
S6_SERVICES_GRACETIME=0
|
||||||
|
|
||||||
# Step 5: Copy rootfs from official image
|
##################
|
||||||
COPY --from=ghcr.io/alexbelgium/portainer_agent-${BUILD_ARCH}:alpine-sts / /
|
# 3 Install apps #
|
||||||
|
##################
|
||||||
|
|
||||||
# Step 6: Override the run script with simplified protection mode check
|
# Add rootfs
|
||||||
RUN mkdir -p /etc/services.d/portainer_agent
|
COPY rootfs/ /
|
||||||
|
|
||||||
RUN cat > /etc/services.d/portainer_agent/run <<'EOF'
|
# Uses /bin for compatibility purposes
|
||||||
#!/usr/bin/with-contenv bashio
|
# hadolint ignore=DL4005
|
||||||
# shellcheck shell=bash
|
RUN if [ ! -f /bin/sh ] && [ -f /usr/bin/sh ]; then ln -s /usr/bin/sh /bin/sh; fi && \
|
||||||
set -e
|
if [ ! -f /bin/bash ] && [ -f /usr/bin/bash ]; then ln -s /usr/bin/bash /bin/bash; fi
|
||||||
# Home Assistant Community Add-on: portainer_agent
|
|
||||||
# PATCHED: Simplified protection mode check with socket fallback
|
|
||||||
|
|
||||||
bashio::require.unprotected.fixed() {
|
# Modules
|
||||||
local protected
|
ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh"
|
||||||
|
|
||||||
bashio::log.info "Checking protection mode..."
|
# 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
|
||||||
|
|
||||||
# Level 1: Try standard bashio method
|
# Manual apps
|
||||||
protected=$(bashio::addon.protected 'self' 2>/dev/null || echo "unknown")
|
ENV PACKAGES="nginx"
|
||||||
|
|
||||||
if [[ "${protected}" != "unknown" ]]; then
|
# Automatic apps & bashio
|
||||||
# API call succeeded - use result
|
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
||||||
bashio::log.debug "Protection mode: ${protected}"
|
RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
|
||||||
if [[ "${protected}" == "false" ]] || [[ -z "${protected}" ]]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Level 2: Fallback - Check Docker socket directly
|
|
||||||
# Logic: If protection mode is OFF, Docker socket WILL be accessible
|
|
||||||
bashio::log.warning "Could not determine protection mode via API, checking Docker socket..."
|
|
||||||
|
|
||||||
if [ -S /run/docker.sock ]; then
|
################
|
||||||
bashio::log.info "Docker socket is accessible - protection mode is OFF"
|
# 4 Entrypoint #
|
||||||
return 0
|
################
|
||||||
else
|
|
||||||
bashio::log.fatal "Docker socket not accessible!"
|
# Add entrypoint
|
||||||
return 1
|
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
|
||||||
fi
|
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
|
||||||
|
|
||||||
|
RUN chmod a+x /usr/sbin/healthcheck && \
|
||||||
|
chmod a+x /usr/sbin/wait-for-signal
|
||||||
|
WORKDIR "/app"
|
||||||
|
ENTRYPOINT [ "/init" ]
|
||||||
|
|
||||||
|
############
|
||||||
|
# 5 Labels #
|
||||||
|
############
|
||||||
|
|
||||||
|
ARG BUILD_ARCH
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG BUILD_DESCRIPTION
|
||||||
|
ARG BUILD_NAME
|
||||||
|
ARG BUILD_REF
|
||||||
|
ARG BUILD_REPOSITORY
|
||||||
|
ARG BUILD_VERSION
|
||||||
|
ENV BUILD_VERSION="${BUILD_VERSION}"
|
||||||
|
LABEL \
|
||||||
|
io.hass.name="${BUILD_NAME}" \
|
||||||
|
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||||
|
io.hass.arch="${BUILD_ARCH}" \
|
||||||
|
io.hass.type="addon" \
|
||||||
|
io.hass.version=${BUILD_VERSION} \
|
||||||
|
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
||||||
|
org.opencontainers.image.title="${BUILD_NAME}" \
|
||||||
|
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
||||||
|
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
||||||
|
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
||||||
|
org.opencontainers.image.licenses="MIT" \
|
||||||
|
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
||||||
|
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
||||||
|
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
||||||
|
org.opencontainers.image.created=${BUILD_DATE} \
|
||||||
|
org.opencontainers.image.revision=${BUILD_REF} \
|
||||||
|
org.opencontainers.image.version=${BUILD_VERSION}
|
||||||
|
|
||||||
|
#################
|
||||||
|
# 6 Healthcheck #
|
||||||
|
#################
|
||||||
|
|
||||||
|
# Avoid spamming logs
|
||||||
|
# hadolint ignore=SC2016
|
||||||
|
RUN \
|
||||||
|
# Handle Apache configuration
|
||||||
|
if [ -d /etc/apache2/sites-available ]; then \
|
||||||
|
for file in /etc/apache2/sites-*/*.conf; do \
|
||||||
|
sed -i '/<VirtualHost/a \ \n # Match requests with the custom User-Agent "HealthCheck" \n SetEnvIf User-Agent "HealthCheck" dontlog \n # Exclude matching requests from access logs \n CustomLog ${APACHE_LOG_DIR}/access.log combined env=!dontlog' "$file"; \
|
||||||
|
done; \
|
||||||
|
fi && \
|
||||||
|
\
|
||||||
|
# Handle Nginx configuration
|
||||||
|
if [ -f /etc/nginx/nginx.conf ]; then \
|
||||||
|
awk '/http \{/{print; print "map $http_user_agent $dontlog {\n default 0;\n \"~*HealthCheck\" 1;\n}\naccess_log /var/log/nginx/access.log combined if=$dontlog;"; next}1' /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.new && \
|
||||||
|
mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If we get here, protection mode is ON
|
ENV HEALTH_PORT="alpine-sts" \
|
||||||
bashio::log.fatal "PROTECTION MODE IS ENABLED!"
|
HEALTH_URL="alpine-sts"
|
||||||
bashio::log.fatal ""
|
HEALTHCHECK \
|
||||||
bashio::log.fatal "To be able to use this add-on, you'll need to disable"
|
--interval=5s \
|
||||||
bashio::log.fatal "protection mode on this add-on. Without it, the add-on"
|
--retries=5 \
|
||||||
bashio::log.fatal "is unable to access Docker."
|
--start-period=30s \
|
||||||
bashio::log.fatal ""
|
--timeout=25s \
|
||||||
bashio::log.fatal "Steps:"
|
CMD healthcheck &>/dev/null || exit 1
|
||||||
bashio::log.fatal " - Go to the Supervisor Panel."
|
|
||||||
bashio::log.fatal " - Click on this add-on."
|
|
||||||
bashio::log.fatal " - Set the 'Protection mode' switch to off."
|
|
||||||
bashio::log.fatal " - Restart the add-on."
|
|
||||||
bashio::log.fatal ""
|
|
||||||
bashio::log.fatal "Access to Docker allows you to do really powerful things"
|
|
||||||
bashio::log.fatal "including complete destruction of your system."
|
|
||||||
bashio::log.fatal "Please, be sure you know what you are doing before"
|
|
||||||
bashio::log.fatal "enabling this feature (and this add-on)!"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Call our fixed function
|
|
||||||
bashio::require.unprotected.fixed
|
|
||||||
|
|
||||||
bashio::log.info "Starting Portainer Agent"
|
|
||||||
|
|
||||||
# Launch app
|
|
||||||
cd /app
|
|
||||||
if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then
|
|
||||||
./agent "$PORTAINER_AGENT_ARGS"
|
|
||||||
else
|
|
||||||
./agent
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
|
|
||||||
RUN chmod +x /etc/services.d/portainer_agent/run
|
|
||||||
|
|
||||||
ENTRYPOINT ["/init"]
|
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --start-period=30s --timeout=5s --retries=3 \
|
|
||||||
CMD /usr/sbin/healthcheck || exit 1
|
|
||||||
|
|||||||
@@ -41,4 +41,4 @@ schema:
|
|||||||
slug: portainer_agent
|
slug: portainer_agent
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons
|
url: https://github.com/alexbelgium/hassio-addons
|
||||||
version: "alpine-sts-bashio-fix"
|
version: "alpine-sts"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
radarr/stats.png
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 20 KiB |
BIN
sonarr/stats.png
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.6 KiB |