Stephen,
I can't help with containered versions - I don't play docker if I can
help it! From what I do know it shouldn't be too hard to docker-compose:
alpine base image + python venv + data dir. Perhaps something like
Claude Sonnet could help you?
I do have an Ansible role which can install mailman3 well enough:
https://github.com/rivimey/ansible-mailman3
I have found upgrading between versions relatively painless apart from
the situation when the host python disappears under its feet when you do
a dist-upgrade. My recommendation is to get all the non-python files
copied over to the new VM, install the venv, run the 'migrates' for
django, and see from there.
Regards,
Ruth
As an aside: I find that my mailman3 relatively frequently (as in once a
month or so) fails to start properly because it can fail in a way
systemd is unable to/doesn't know it needs/ to restart it. I run this
script in cron to catch that:
#!/bin/bash
#
fn=/tmp/mm$$
trap "rm -f $fn" exit term
systemctl status mailman3-core >$fn
if grep -q 'Active: active (running)' $fn ; then
exit
fi
sleep 10
sudo systemctl restart mailman3-core
sleep 5
echo =-=-=-= >>$fn
systemctl status mailman3-core >>$fn
if grep -q 'Active: active (running)' $fn ; then
mailx -s 'Mailman3 systemctl status: restarted' [email protected]
<$fn
exit
fi
mailx -s 'Mailman3 systemctl status: failure' [email protected] <$fn
exit 1
I used to use this script, set to run by systemctl as an 'on boot'
service, but the systemctl restart above seems to be sufficient at the
moment:
The systemd service file (presumes mailman3 is run using the name
mailman3-core, which might not be true for you):
[Unit]
Description=Unlock Mailman3 if system crashed and left lock files around
Wants=mailman3-core.service
Before=mailman3-core.service multi-user.target
After=basic.target
RefuseManualStart=true
[Service]
Type=simple
ExecStart=/usr/local/bin/mailman3-unlock.sh
Restart=no
KillMode=process
[Install]
WantedBy=multi-user.target
And the bash shell script referenced by the service. As you can see it
checks to see if mailman is actually running before killing any locks!
(presumes a location for the mailman3 installation, which is unlikely to
be true for you):
#!/bin/sh
# Carefully unlock mailman3 in the case that it wasn't shut down
properly.
# If the lock files are left, mailman3 will refuse to start up.
# See if there is a mailman3 master process running... if so, unlocking
# is unsafe.
nprocs=$(ps ax |grep mailman3/bin/master |grep -v grep |wc -l)
if [ "$nprocs" -eq 0 ] ; then
if [ -f /opt/mailman3/var/core/master.lck ]; then
echo "mailman3-unlock: lock files found, unlocked" |
systemd-cat -p warning
rm -f /opt/mailman3/var/core/master.lck*
else
echo "mailman3-unlock: no locks" | systemd-cat -p info
fi
else
echo "mailman3-unlock: mailman3 is already running!" |
systemd-cat -p warning
exit 1
fi
exit 0
--
Software Manager & Engineer
Tel: 01223 414180
Blog:http://www.ivimey.org/blog
_______________________________________________
Mailman-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/[email protected]/message/EUCEBZBSLQFNRSF6Q5KTYMAVIWLX75UQ/
This message sent to [email protected]