From bb5482ed6daf356fe0f45aceeab63fbeacd9cd28 Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Sat, 25 Sep 2021 16:53:33 +0100 Subject: [PATCH] mariadb: Implement health-checks and ready notify This integrates systemd ready notifications against native support available in MariaDB, and integrates health-checks for good measure. --- config/service/mariadb/systemd/mariadb.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/service/mariadb/systemd/mariadb.service b/config/service/mariadb/systemd/mariadb.service index c8aa5cc..c231eb3 100644 --- a/config/service/mariadb/systemd/mariadb.service +++ b/config/service/mariadb/systemd/mariadb.service @@ -9,9 +9,10 @@ NotifyAccess=all SyslogIdentifier=%N Restart=on-failure Environment=PODMAN_SYSTEMD_UNIT=%n -ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \ +ExecStart=/bin/podman run --replace --name %N --net internal \ --env-file %E/coreos-home-server/%N/%N.env \ --volume %N:/var/lib/mysql:z \ + --health-cmd 'mariadb-admin -uroot -p$MYSQL_ROOT_PASSWORD ping' \ localhost/%N:latest ExecStop=/bin/podman stop --ignore --time 10 %N ExecStopPost=/bin/podman rm --ignore --force %N