-
Notifications
You must be signed in to change notification settings - Fork 21
Docker
Self-Hosted SimpleLogin runs on Docker.
The containers run in the following dependency tree:
├─ postgres
| └─ migration
│ └─ init
│ └─ app
│ └─ traefik-certificate-exporter
│ └─ postfix
│ └─ email
│ └─ job_runner
├─ dns
| └─ postfix
└─ traefikIt could be argued that postfix depends on email to process incoming messages, whereas email depends on postfix to process outgoing and forwarded messages.
For simplicify, this setup makes sure that the email handler only starts when postfix is running.
On the other hand, the postfix container runs a healthcheck task to periodically check that the email handler is running. This ensures both services can safely rely on one another.
Likewise, postfix uses the pgsql-relay-domains.cf and pgsql-transport-maps.cf configuration as part of its configuration.
This means postfix needs postgres to run and be healthy, which this setup implicitly ensures.
This project enforces strong dependency (not shown in the tree) by explicitly added the following
directive in postfix-compose.yaml:
postfix:
image: private/postfix:latest
…
depends_on:
dns:
condition: service_healthy
+ postgres:
+ condition: service_healthy
traefik-certificate-exporter:
condition: service_healthy