Fudge apparmor

This commit is contained in:
Colin Seymour
2026-06-15 16:09:56 +00:00
parent ff4f4bcbf5
commit e5e379a383
2 changed files with 13 additions and 9 deletions
+12 -2
View File
@@ -48,10 +48,20 @@ jobs:
fi
echo "::endgroup::" >&2
echo "::group::Start Supervisor" >&2
# AppArmor profile enforcement on add-on containers makes the
# PostgreSQL add-on's first-boot initdb file I/O so slow it blows
# past that add-on's hard 2-minute startup timeout on GitHub Actions
# runners. SUPERVISOR_UNCONFINED only unconfines the Supervisor
# itself, not the add-ons it launches, so instead stub apparmor_parser
# to a no-op and mount it into the Supervisor's privileged container.
# Add-on profiles are then never loaded and add-ons run effectively
# unconfined (matches the proven ha-addon-ghostfolio CI setup).
printf '#!/bin/sh\nexit 0\n' | sudo tee /usr/sbin/apparmor_parser > /dev/null && sudo chmod +x /usr/sbin/apparmor_parser
sudo sed -i 's|docker run --rm --privileged|docker run --rm --privileged -v /usr/sbin/apparmor_parser:/usr/sbin/apparmor_parser:ro|' /usr/bin/supervisor_run
if [ -n "${DEBUG:-}" ]; then
SUPERVISOR_UNCONFINED=1 supervisor_run &
supervisor_run &
else
SUPERVISOR_UNCONFINED=1 supervisor_run > /dev/null 2>&1 &
supervisor_run > /dev/null 2>&1 &
fi
echo "::endgroup::" >&2
bash .devcontainer/setup-ha.sh