Our own setup

One domain, five independent services

Site, public service, mail, bot and an internal application: different names on the same domain, each isolated from the others.

Context

Registering a domain per project costs money every year and multiplies the expiry dates to remember, which is the most common way to lose one. The practical question was a different one: how many services can a single domain carry before they start getting in each other's way.

What we did

  • Each service has its own third-level name, its own container and its own certificate, issued and renewed on its own.
  • The mail record exists on one name only: names that do not send publish no MX at all.
  • Renewal and expiry dates in a single place, with the registration in the company's name.

Stack

  • DNS
  • Traefik
  • Let's Encrypt
  • Docker

Result

  • Five services in production with a single registration to renew.
  • A service going down does not touch the others: only the name that answers changes.
  • Every choice, proxy, mail or certificate, is made per record and not per domain.