version: "3.4"

networks:
  default:
    external:
      name: traefik_default
services:
  l2geth-replica:
    labels:
      - traefik.enable=true
      - traefik.http.routers.l2geth.service=l2geth
      - traefik.http.routers.l2geth.entrypoints=websecure
      - traefik.http.routers.l2geth.rule=Host(`${L2GETH_HOST}.${DOMAIN}`)
      - traefik.http.routers.l2geth.tls.certresolver=letsencrypt
      - traefik.http.routers.l2gethlb.service=l2geth
      - traefik.http.routers.l2gethlb.entrypoints=websecure
      - traefik.http.routers.l2gethlb.rule=Host(`${L2GETH_LB}.${DOMAIN}`)
      - traefik.http.routers.l2gethlb.tls.certresolver=letsencrypt
      - traefik.http.services.l2geth.loadbalancer.server.port=8545
      - traefik.http.routers.l2gethws.service=l2gethws
      - traefik.http.routers.l2gethws.entrypoints=websecure
      - traefik.http.routers.l2gethws.rule=Host(`${L2GETH_WS_HOST}.${DOMAIN}`)
      - traefik.http.routers.l2gethws.tls.certresolver=letsencrypt
      - traefik.http.routers.l2gethwslb.service=l2gethws
      - traefik.http.routers.l2gethwslb.entrypoints=websecure
      - traefik.http.routers.l2gethwslb.rule=Host(`${L2GETH_WS_LB}.${DOMAIN}`)
      - traefik.http.routers.l2gethwslb.tls.certresolver=letsencrypt
      - traefik.http.services.l2gethws.loadbalancer.server.port=8546
  replica-healthcheck:
    labels:
      - traefik.enable=true
      - traefik.http.routers.l2gethhealth.service=l2gethhealth
      - traefik.http.routers.l2gethhealth.entrypoints=websecure
      - traefik.http.routers.l2gethhealth.rule=Host(`${L2GETH_HEALTH_HOST}.${DOMAIN}`)
      - traefik.http.routers.l2gethhealth.tls.certresolver=letsencrypt
      - traefik.http.services.l2gethhealth.loadbalancer.server.port=3000
