Run binaries directly:
cmd/apicmd/smtp-inboundcmd/smtp-submissioncmd/imapcmd/autoconfigcmd/orchestratorcmd/mail-worker
Use process managers such as systemd, supervisor, or Nomad.
All-in-one image:
docker build -t midemail:latest .
Select runtime service with MIDEMAIL_SERVICE.
Examples:
- API:
MIDEMAIL_SERVICE=api - Orchestrator:
MIDEMAIL_SERVICE=orchestrator - Worker:
MIDEMAIL_SERVICE=mail-worker - Migrations:
MIDEMAIL_SERVICE=migrate,MIDEMAIL_MIGRATE_ARGS=up
Manifests live in deploy/k8s.
Apply order:
- namespace
- configmap
- secret
- migrate job
- deployments
- services
Base IaC in deploy/terraform/linode:
- VPC
- LKE cluster
- Redis VM
Use outputs to wire kubeconfig and Redis endpoint into K8s manifests/secrets.
- Cloud Run: run
MIDEMAIL_SERVICE=apiand optionallyautoconfig - Lambda (container): run API with an adapter layer (API Gateway/ALB integration)
Protocol services (SMTP/IMAP) typically remain on VM/K8s due to port and long-connection requirements.