Traefik Docker guide

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Source Code

      1. docker run -d --name=traefik --network=traefik --restart=always \
      2. -e PUID=1000 \
      3. -e PGID=1000 \
      4. -e TZ=Europe/London \
      5. -v /var/run/docker.sock:/var/run/docker.sock \
      6. -v $PWD/traefik.toml:/config/traefik/traefik.toml \
      7. -v $PWD/acme.json:/config/traefik/acme.json \
      8. -p 80:80 \
      9. -p 443:443 \
      10. -p 8080:8080 \
      11. -l traefik.frontend.rule=Host:monitor.mysite.co.uk \
      12. -l traefik.port=8080 \
      13. traefik:1.7.2-alpine
      Display All

      Source Code

      1. defaultEntryPoints = ["http", "https"]
      2. [entryPoints]
      3. [entryPoints.dashboard]
      4. address = ":8080"
      5. [entryPoints.dashboard.auth]
      6. [entryPoints.dashboard.auth.basic]
      7. users = ["user:password"]
      8. [entryPoints.http]
      9. address = ":80"
      10. [entryPoints.http.redirect]
      11. entryPoint = "https"
      12. [entryPoints.https]
      13. address = ":443"
      14. [entryPoints.https.tls]
      15. [api]
      16. entrypoint="dashboard"
      17. [acme]
      18. email = "me@mysite.co.uk"
      19. storage = "acme.json"
      20. entryPoint = "https"
      21. onHostRule = true
      22. [acme.httpChallenge]
      23. entryPoint = "http"
      24. [docker]
      25. domain = "mysite.co.uk"
      26. watch = true
      27. network = "traefik"
      Display All
    • The first thing I see that might be a problem is this:

      -p 80:80
      -p 443:443

      Since OMV runs on port 80 or port 443, your container can't use the same ports.
      --
      Google is your friend and Bob's your uncle!

      RAID - Its ability to disappoint is inversely proportional to the user's understanding of it.

      ASRock Rack C2550D4I - 16GB CC - Silverstone DS380