services:
  zot:
    image: ghcr.io/project-zot/zot-linux-amd64:latest
    container_name: zot-node${ZOT_NODE_ID}
    restart: unless-stopped
    user: "1000:1000"
    volumes:
      - /shared/zot/etc:/etc/zot
      - /shared/zot/var:/var/lib/zot
    networks:
      - zot_external
      - zot_internal
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=zot_external"
      - "traefik.http.routers.zot.rule=Host(`${ZOT_HOST_NAME}.${TRAEFIK_DNS_SUFFIX}`)"
      - "traefik.http.routers.zot.tls=true"
      - "traefik.http.routers.zot.tls.certresolver=dns_resolver"
      - "traefik.http.services.zot.loadbalancer.server.port=5000"

networks:
  zot_internal:
    driver: bridge
  zot_external:
    external: true