version: "3.7"

networks:
  mother:
    external: true

  
services:

  watcher:
    image: registry.vnfco.ir/ig/watcher:latest
    environment:
    deploy:
      update_config:
        parallelism: 1
        delay: 10s
        order: start-first
      restart_policy:
        condition: any
        delay: 5s
        window: 120s 
      resources:
        limits:
          cpus: '0.1'
          memory: 10M
      replicas: 1
      mode: replicated
      placement:
        constraints:
          - node.role == manager
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "/volume/watcher/service_list:/usr/app/src/service_list:ro"
    networks:
      - mother