From ff1d3541abbc24feb3a277b515d6380d705fad50 Mon Sep 17 00:00:00 2001 From: j4n Date: Mon, 23 Feb 2026 08:59:51 +0100 Subject: [PATCH] cmdeploy: prepare chatmaild/cmdeploy changes for Docker support - chatmaild: - basedeploy.py: Add has_systemd() guard. During Docker image builds there's no running systemd, so deployers that query SystemdEnabled facts would crash; this change might also be helpful for non-systemd platforms. - cmdeploy: - cmdeploy.py: - when deploying to @docker, auto-set CHATMAIL_NOPORTCHECK and CHATMAIL_NOSYSCTL since neither makes sense inside a container - --config default now reads CHATMAIL_INI env var, so Docker entrypoints can point to a mounted ini without CLI flags. - deployers.py: - skip port check / CHATMAIL_NOPORTCHECK - skip echobot systemd cleanup w/ has_systemd - dovecot/deployer.py: - Guard sysctl writes behind CHATMAIL_NOSYSCTL - invert dovecot install check so it works without systemd - sshexec.py: Add __call__ to LocalExec so cmdeploy status works with @local target. Without it, cmdeploy status tried to call the executor directly and got TypeError. Consolidated from j4n/docker branch commits (selection): - 8953fde feat(cmdeploy): read CHATMAIL_INI env var for default --config path - 81d7782 fix(cmdeploy): add __call__ to LocalExec so status works with @local - 8bba78e docker: disable port check if docker is running. fix #694 - 865b514 docker: replace config flags with env vars, drop docker param (instead of f26cb08) Files: cmdeploy/src/cmdeploy/{basedeploy,cmdeploy,deployers,sshexec,dovecot/deployer}.py Co-authored-by: Keonik1 Co-authored-by: missytake --- cmdeploy/src/cmdeploy/deployers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmdeploy/src/cmdeploy/deployers.py b/cmdeploy/src/cmdeploy/deployers.py index 897ae6f0..3ddb7c96 100644 --- a/cmdeploy/src/cmdeploy/deployers.py +++ b/cmdeploy/src/cmdeploy/deployers.py @@ -599,6 +599,9 @@ def deploy_chatmail(config_path: Path, disable_mail: bool, website_only: bool) - # so don't complain during upgrade that moved it to port 402 # and gave the port to nginx. (["acmetool", "nginx"], 80), + port_services.append(("acmetool", 80)) + port_services += [ + (["imap-login", "dovecot"], 143), ("nginx", 443), (["master", "smtpd"], 465), (["master", "smtpd"], 587),