version: "2.1"
services:
  znc:
    image: linuxserver/znc
    container_name: znc
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Copenhagen
    volumes:
      - /srv/znc:/config
    ports:
      - 6501:6501
      - 6697:6697
      - 7894:7894
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.znc.entrypoints=websecure"
      - "traefik.http.routers.znc.rule=Host(`znc.$DOMAIN_NAME`)"
      - "traefik.http.routers.znc.tls.certresolver=letsencr"
      - "traefik.tcp.routers.znc.entrypoints=irc"
      - "traefik.tcp.routers.znc.service=znc"
      - "traefik.tcp.services.znc.loadbalancer.server.port=6501" 
    restart: unless-stopped
networks:
  default:
    external:
      name: $DEFAULT_NETWORK