services:
  traefik-proxy:
    container_name: traefik-proxy
    # The official v2 Traefik docker image
    image: traefik:latest # latest for v3 or v2.11
    restart: always
    # Enables the web UI and tells Traefik to listen to docker
    command: 
      - --api.insecure=true 
      - --providers.docker 
      #- --pilot.token=347e24e3-f786-4583-92af-0a1b097d47af
    ports:
      # The HTTP port
      - "80:80"
      # The HTTPS port
      - "443:443"
      # The Web UI (enabled by --api.insecure=true)
      - "8080:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik/traefik.yml:/etc/traefik/traefik.yml # Traefik static config
      - ./traefik/certs:/etc/certs # SSL certificates
      - ./traefik/configs:/etc/traefik/configs # Dynamic Configs
      - /dev/shm:/dev/shm
    networks:
      - internal
      - traefik

  uptime-kuma:
    container_name: uptime-kuma
    image: louislam/uptime-kuma:1
    restart: always
    volumes:
      - uptime-kuma:/app/data
    ports:
      - 3001:3001
    networks:
      - traefik

  dashy:
    # To build from source, replace 'image: lissy93/dashy' with 'build: .'
    # build: .
    image: lissy93/dashy
    container_name: Dashy
    # Pass in your config file below, by specifying the path on your host machine
    volumes:
      - ./dashy-config.yml:/app/user-data/conf.yml
    #ports:
    #  - 8080:8080
    # Set any environmental variables
    environment:
      - NODE_ENV=production
    # Specify your user ID and group ID. You can find this by running `id -u` and `id -g`
      - UID=1000
      - GID=1000
    # Specify restart policy
    restart: unless-stopped
    # Configure healthchecks
    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    networks:
      - internal

volumes:
  uptime-kuma:
    name: "uptime-kuma"
    external: true

networks:
  internal:
    #driver: overlay
    attachable: true
    external: true
    name: services_internal
  traefik:
    external: true
    name: traefik-net
