version: '3.9'
services:
    it-tools:
        image: 'corentinth/it-tools:latest'
        #ports:
        #    - '8080:80'
        restart: unless-stopped
        container_name: it-tools
        networks:
          - proxy
        labels:
          - "traefik.enable=true"
          - "traefik.docker.network=proxy"
          - "traefik.http.routers.it-tools.entrypoints=http"
          - "traefik.http.routers.it-tools.rule=Host(`it-tools.jimsgarage.co.uk`)"
          - "traefik.http.middlewares.it-tools-https-redirect.redirectscheme.scheme=https"
          - "traefik.http.routers.it-tools.middlewares=it-tools-https-redirect"
          - "traefik.http.routers.it-tools-secure.entrypoints=https"
          - "traefik.http.routers.it-tools-secure.rule=Host(`it-tools.jimsgarage.co.uk`)"
          - "traefik.http.routers.it-tools-secure.tls=true"
          - "traefik.http.routers.it-tools-secure.tls.certresolver=cloudflare"
          - "traefik.http.routers.it-tools-secure.service=it-tools"
          - "traefik.http.services.it-tools.loadbalancer.server.port=80"

networks:
  proxy:
    external: true