Enable local service health checks during installation
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s

This commit is contained in:
parkel committed 2026-11-22 22:27:08 +01:00
1 parent 7e51716122
commit 52b3e84413
5 files changed
+87 -5

No files matched your search

+25 -1
View File
@@ -34,6 +34,7 @@ PANEL_UNITS = (
"coulobre-worker.service",
"coulobre-beat.service",
)
HEALTH_TIMER = "coulobre-health.timer"
BASE_PACKAGES = (
"apache2",
"mariadb-server",
@@ -547,6 +548,20 @@ class Installer:
)
def environment(self):
services = [
"panel",
"worker",
"scheduler",
"apache",
"mariadb",
"rabbitmq",
]
if self.php:
services.append("php-fpm")
if self.plan.dns.mode == "local":
services.append("bind9")
if self.plan.mail.mode == "local":
services.extend(("postfix", "dovecot", "rspamd", "redis"))
options = {
"DJANGO_SETTINGS_MODULE": "coulobre.settings",
"COULOBRE_ALLOWED_HOSTS": self.plan.hostname,
@@ -564,6 +579,9 @@ class Installer:
f"amqp://coulobre:{self.state['broker_password']}@127.0.0.1:5672/coulobre"
),
"COULOBRE_LOCAL_DATABASE_PROVISIONING": "1",
"COULOBRE_SERVICE_HEALTH": json.dumps(
{"panel": {"local": services}}, separators=(",", ":")
),
}
if self.php:
options["COULOBRE_LOCAL_WEB_ACTIVATION"] = "1"
@@ -829,13 +847,19 @@ class Installer:
self.prepare_panel()
self.progress("Validating Apache and starting the panel services.")
self.apache()
for unit in PANEL_UNITS:
identity("coulobre-health")
for unit in (
*PANEL_UNITS,
"coulobre-health.service",
HEALTH_TIMER,
):
install_unit(unit)
systemctl("daemon-reload")
systemctl(
"enable", "--now", *PANEL_UNITS, *workers, "apache2.service"
)
systemctl("reload", "apache2.service")
systemctl("enable", "--now", HEALTH_TIMER)
self.verify_panel()
if self.plan.mail.mode == "local":
with self.step("Checking Postfix for outgoing panel email"):