http: routers: # API — HTTP api-http: rule: "Host(`{{ env "DOMAIN" }}`) && PathPrefix(`/api`)" entryPoints: - web service: api # Web — HTTP web-http: rule: "Host(`{{ env "DOMAIN" }}`)" entryPoints: - web service: web # API — HTTPS (production with real domain + cert) api: rule: "Host(`{{ env "DOMAIN" }}`) && PathPrefix(`/api`)" entryPoints: - websecure service: api tls: certResolver: letsencrypt # Web — HTTPS (production with real domain + cert) web: rule: "Host(`{{ env "DOMAIN" }}`)" entryPoints: - websecure service: web tls: certResolver: letsencrypt services: api: loadBalancer: servers: - url: "http://api:8000" web: loadBalancer: servers: - url: "http://web:80"