#1088619 mailman3-web: Provide caddy webserver integration

#1088619#5
Date:
2024-11-28 16:16:16 UTC
From:
To:
Currently mailman3-web provides configurations for apache2 and nginx,
it'd be nice to have caddy as an option too (it mainly includes the
certbot functionality built-in).

reference
https://caddy.community/t/caddyfile-syntax-for-uwsgi-server-flasp-app/23080

https://caddy.community/t/v2-reverse-proxy-to-unix-socket/7071/3


This will need
https://caddyserver.com/docs/modules/http.reverse_proxy.transport.uwsgi#github.com/BadAimWeeb/caddy-uwsgi-transport

Do we have a plan for supporting caddy modules? I assume this will need
a new package per module, instead of dynamically loading it at runtime.

This snippet should ideally work (untested since caddy uwsgi is not
available)

lists.example.com {
         reverse_proxy * unix//run/mailman3-web/uwsgi.sock {
                 transport uwsgi {
                         uwsgi_param UWSGI_INI /etc/nginx/uwsgi_params
                 }
         }
         file_server /mailman3/static/* {
                 root /var/lib/mailman3/web/static
         }
         file_server /mailman3/static/favicon.ico {
                 root /var/lib/mailman3/web/static/postorius/img/favicon.ico
         }
}