relay icon indicating copy to clipboard operation
relay copied to clipboard

Explore making cmdeploy/chatmaild pip-installable

Open hpk42 opened this issue 2 months ago • 2 comments

right now, the only way to setup a chatmail relay is via checkout of the relay repository.

Two base reasons to consider a pip-installable chatmaild and cmdeploy:

  • On can not easily use the chatmail-metadata service in own email server setups. See https://codeberg.org/kassner/chatmail-container for how someone made it work with their otherwise classic email setup, based on a Fediverse-discussion https://phpc.social/@kassner/115340064265140044

  • One can not do "pip install cmdeploy" and start using the cmdeploy command line interface just so. "pip" is a relatively well known way to install python packages and there is nothing inherently hard about making it work.

Concerns to sort out:

  • versioning of chatmaild and cmdeploy (the latter probably depending on the former)
  • how to generate default web pages (instead of relying on www folder), and how to do configure/do custom ones
  • does a pip-installable cmdeploy interfere with the ongoing docker PRs?
  • we probably still want to support installing via repository checkout

Note that this issue is only for raising concerns and discussing / tracking whether to go for it. If so, i'd create an issue with an implementation plan, and close this one here.

hpk42 avatar Oct 20 '25 16:10 hpk42

chatmaild -- this would also be useful for lowering the barrier to porting the relay to non-Debian-Linux OSes (not deployed with cmdeploy)

feld avatar Oct 20 '25 16:10 feld

Actually, how to match versioning for chatmail and cmdeploy is probably one of the most difficult questions here.

It seems that we can use classic semantic versioning for chatmaild and “date-based releases” for cmdeploy.

https://packaging.python.org/en/latest/specifications/version-specifiers/#examples-of-compliant-version-schemes

About web pages:

  • There is nothing stopping us from putting configuration files, templates, and other stuff inside the pypi package. So in case of web pages, we can still use templates. But here's an important point - maybe we should add some kind of handle to use custom pages. For example, in superset, you can use the config.py file, which has a higher priority than the default and is read from the path specified by the environment variable.

About Docker:

  • If we install via pip, it will be better. We will be able to pin a specific version in the container and release tags for each release.

About installation via checkout:

  • I think the following will suffice:
git clone <url> ./relay
cd relay
pip install .

Keonik1 avatar Oct 20 '25 17:10 Keonik1