services:
  bore-tunnel:
    restart: unless-stopped
    build: 
      context: .
      dockerfile: ./Dockerfile
    environment:
      - 'BORE_SECRET=${BORE_SECRET}'
    ports:
      - '6022:6022'
    healthcheck:
      test: ["CMD", "/bin/sh", "-c", "exit 0"]
    labels:
      - traefik.enable=true
      - traefik.http.middlewares.gzip.compress=true
      - traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
      - traefik.http.routers.http-0-d0ws408wc4cc0o4ksws80kw0-bore-tunnel.entryPoints=http
      - traefik.http.routers.http-0-d0ws408wc4cc0o4ksws80kw0-bore-tunnel.middlewares=gzip
      - 'traefik.http.routers.http-0-d0ws408wc4cc0o4ksws80kw0-bore-tunnel.rule=HostRegexp(`^(?:.+-)?ikea\.jdf2\.org$`) && PathPrefix(`/`)'
      - traefik.http.routers.http-0-d0ws408wc4cc0o4ksws80kw0-bore-tunnel.service=http-0-d0ws408wc4cc0o4ksws80kw0-bore-tunnel
      - traefik.http.services.http-0-d0ws408wc4cc0o4ksws80kw0-bore-tunnel.loadbalancer.server.port=6080
      - traefik.tcp.routers.tcpecho-le.entrypoints=bore-tcp
      - traefik.tcp.routers.tcpecho-le.rule=HostSNI(`bore-pretzel.jdf2.org`)
      - traefik.tcp.services.tcpecho-le.loadbalancer.server.port=7835