self-hosted-simplelogin icon indicating copy to clipboard operation
self-hosted-simplelogin copied to clipboard

Unsuccessful first start of the stack, due to configuration misorder

Open chrisblech opened this issue 1 month ago • 2 comments

When starting up this stack, there are some dependencies regarding SSL-certificates:

  1. when containers sl-app and traefik are both up and running, traefik starts requesting certificates from letsencrypt
  2. after traefik saved certificates in its storage, traefik-certificate-exporter creates certificate files in postfix-readable format
  3. now, this logic can decide how to configure postfix to use them
  4. after changing postfix configuration, postfix needs to be restarted to pick the new configuration up

On first startup via up.sh, the logic in up.sh fails, because this step (3) is run before steps (1) and (2) had a chance to complete.

I would propose (and already prepared a PR) to move this postfix configuration "inside" the postfix container, as a entrypoint script. So postfix configuration is executed on every restart of this container.

As a side effect, it enables using this stack on evironments that can't run scripts on the host machine, i.e. only using a portainer UI.

Before submitting a PR, I have one question: is it useful for the user, to have access to the postfix configuration templates and be able to modify them? Or is it possible to place them (statically "baked" on build time) inside the postfix container?

chrisblech avatar Nov 09 '25 19:11 chrisblech