From 62fdd2413f5abc5e5d6b71a355513459e10142f0 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 4 Dec 2024 21:40:17 +0100 Subject: [PATCH] Added additional upgrade procedures for listmonk --- roles/update-docker/files/update-docker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/update-docker/files/update-docker.py b/roles/update-docker/files/update-docker.py index caf8fcd4..0dacdc95 100644 --- a/roles/update-docker/files/update-docker.py +++ b/roles/update-docker/files/update-docker.py @@ -106,6 +106,14 @@ def update_mastodon(): run_command("docker compose exec -T web bash -c 'RAILS_ENV=production bin/rails db:migrate'") print("Mastodon database migration complete.") +def upgrade_listmonk(): + """ + Runs the upgrade for Listmonk + """ + print("Starting Listmonk upgrade.") + run_command("docker compose run application ./listmonk --upgrade") + print("Upgrade complete.") + def update_nextcloud(): """ Performs the necessary Nextcloud update procedures, including maintenance and app updates. @@ -189,8 +197,10 @@ if __name__ == "__main__": # Pull and update docker images update_docker(dir_path) - # Nextcloud needs additional update procedures + # The following instances need additional update and upgrade procedures if os.path.basename(dir_path) == "nextcloud": update_nextcloud() + elif os.path.basename(dir_path) == "listmonk": + upgrade_listmonk() elif os.path.basename(dir_path) == "mastodon": update_mastodon()