From 606a26a0087e08f23d6c0c3baa61929148480311 Mon Sep 17 00:00:00 2001 From: Thomas Kleinendorst Date: Mon, 15 Apr 2024 20:35:57 +0200 Subject: [PATCH] Add link for starting containers on system boot As mentioned in the comment; this behavior is different in Podman than how it is in Docker. --- roles/actual/tasks/main.yml | 6 +++++- roles/pi-hole/tasks/main.yml | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/actual/tasks/main.yml b/roles/actual/tasks/main.yml index 9ed6a2a..c87e418 100644 --- a/roles/actual/tasks/main.yml +++ b/roles/actual/tasks/main.yml @@ -19,7 +19,11 @@ containers.podman.podman_container: name: actual-server image: docker.io/actualbudget/actual-server:24.4.0 - restart_policy: on-failure # TODO: Doesn't restart containers on reboot for some reason... + # TODO: Enable containers on boot + # I expected podman containers to restart on boot with this policy but apparently the documentation specifically + # states that they won't do this. There seems to be an involved workaround to get this to work whilst keeping the + # containers "rootless". See this guide: https://linuxhandbook.com/autostart-podman-containers/ + restart_policy: on-failure publish: - 127.0.0.1:5006:5006 volumes: diff --git a/roles/pi-hole/tasks/main.yml b/roles/pi-hole/tasks/main.yml index e5d9d38..03751bc 100644 --- a/roles/pi-hole/tasks/main.yml +++ b/roles/pi-hole/tasks/main.yml @@ -40,6 +40,10 @@ containers.podman.podman_container: name: pi-hole image: docker.io/pihole/pihole:2024.03.2 + # TODO: Enable containers on boot + # I expected podman containers to restart on boot with this policy but apparently the documentation specifically + # states that they won't do this. There seems to be an involved workaround to get this to work whilst keeping the + # containers "rootless". See this guide: https://linuxhandbook.com/autostart-podman-containers/ restart_policy: on-failure publish: # It seems we can't use authbind in combination with Podman, see: https://github.com/containers/podman/issues/13426.