services:
  caddy:
    #image: caddy:latest
    container_name: caddy
    build:
      dockerfile: Dockerfile
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    ports:
      - "2019:2019"
      - "80:80"
      - "443:443"
      - "443:443/udp"
      - "8088:8088"
    volumes:
      - /home/ccalifice/docker-data/caddy/Caddyfile:/etc/caddy/Caddyfile
      - /home/ccalifice/docker-data/caddy/site/bortolaso-sail:/srv/bortolaso-sail
      - /home/ccalifice/docker-data/caddy/caddy-data:/data
      - /home/ccalifice/docker-data/caddy/caddy-config:/config
      - /home/ccalifice/docker-data/caddy/site/webhook-gtm:/srv/webhook-gtm
    networks:
      - caddy-net

  newt:
    image: fosrl/newt
    container_name: newt
    restart: unless-stopped
    environment:
      - PANGOLIN_ENDPOINT=https://pangolin.sereiaguardia.com
      - NEWT_ID=t9eefucz8uk0qds
      - NEWT_SECRET=tqb7nl80iwqsmyox0nndb82k516egcc7ui4fkuigvesuui3f
    networks:
      - caddy-net

  # cloudflared:
  #     image: cloudflare/cloudflared:latest
  #     container_name: cloudflared
  #     user: "0:0"
  #     volumes:
  #     - ./config:/root/.cloudflared
  #     #command: tunnel login
  #     #command: tunnel create tunnel_ccalifice
  #     command: tunnel --no-autoupdate run
  #     restart: unless-stopped
  #     networks:
  #       - caddy-net


#  ddns-updater:
#    image: qmcgaw/ddns-updater
#    container_name: ddns-updater
#    network_mode: bridge
#    ports:
#      - 8008:8000/tcp
#    volumes:
#      - ./ddns/data:/updater/data
#    environment:
#      - CONFIG=
#      - PERIOD=5m
#      - UPDATE_COOLDOWN_PERIOD=5m
#      - PUBLICIP_FETCHERS=all
#      - PUBLICIP_HTTP_PROVIDERS=all
#      - PUBLICIPV4_HTTP_PROVIDERS=all
#      - PUBLICIPV6_HTTP_PROVIDERS=all
#      - PUBLICIP_DNS_PROVIDERS=all
#      - PUBLICIP_DNS_TIMEOUT=3s
#      - HTTP_TIMEOUT=10s
      # Web UI
#      - LISTENING_ADDRESS=:8000
#      - ROOT_URL=/
      # Backup
#      - BACKUP_PERIOD=0 # 0 to disable
#      - BACKUP_DIRECTORY=/updater/data
      # Other
#      - LOG_LEVEL=info
#      - LOG_CALLER=hidden
#      - SHOUTRRR_ADDRESSES=
#    restart: always

networks:
  caddy-net:
    driver: bridge
    name: caddy-net
