Understand File Provider in Traefik 2

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • In my previous videos I've shown you how to deploy applications with Docker and Traefik 2.
    In this video, I demonstrate how to use File Provider to config Traefik 2 dynamically.
    You can find my related article at
    tech.aufomm.com

Комментарии • 24

  • @krumelmonster3781
    @krumelmonster3781 4 месяца назад

    Thank you for your introduction, I really appreciate it. My goal is not to expose the unix docker socket to traefik

  • @Kube4x
    @Kube4x 2 года назад +1

    Using labels in the docker compose is better than using the config file in my opinion.
    Edit: 13 days later, I now agree that the file provider is better lol. Its a lot cleaner and i like not having all the redundant stuff in the docker compose file. Great vid man

    • @liyangau
      @liyangau  2 года назад

      Hi Keem, thanks for the update and I am glad you also find file provider is cleaner and easier to use.
      If you are interested in using Kubernetes, you will find the concept of deployment, service, ingress similar to what you have for file provider.

  • @uwuwaifu101
    @uwuwaifu101 Год назад

    Thank you Li, this helped me so much. Please, if you have any time - I would like to see more tutorials from you. It's amazing. Your explanations are easy to follow, you explain it in depth and it helps so much. Thank you again and have a nice day.

  • @richards7502
    @richards7502 4 года назад +3

    Great post thanks. Just what I was looking for

    • @liyangau
      @liyangau  4 года назад

      Thanks Richard, I am glad you find the information useful.

  • @Tro79xD
    @Tro79xD 2 года назад

    Thanks, now I full understand file providers!

  • @danmelt8184
    @danmelt8184 3 года назад

    Can you show working with custom plugins? Great video👍🏾

  • @dragon3602010
    @dragon3602010 4 года назад +1

    Thank uuu
    But what about the ip of the container, if we restart or recreate one , the ip will change
    and with the labels, it doesn't matter , right ?

    • @liyangau
      @liyangau  4 года назад +2

      Hi Mikey. You are the first viewer to comment on my videos in a row. 😊
      From my experience, internal ip address of a container/service does not change when you restart/recreate it. You only need to check internal ip when you are creating a new service.
      You don't need to worry about the internal ip address when you use label as Traefik will find the container automatically.
      In fact, with labels, you don't even need to define service with labels as Traefik will do it for you automatically. docs.traefik.io/routing/providers/docker/#service-definition

    • @dragon3602010
      @dragon3602010 4 года назад +2

      @@liyangau hehe yeah i'm becoming a faan 😁
      ooh thank you for all this infos 😊
      by the way, did you ever try "nginx proxy manager" to compare with Traefik

  • @JonnieAlpha
    @JonnieAlpha 2 года назад

    I see you mounted a whole folder with dynamic configurations in your traefik docker-compose. Is there a way to mount only a file and still be able to dynamically change the config without restarting the container? If i mount only a file, i will have to restart the traefik.

    • @g-nice_pimp
      @g-nice_pimp 2 года назад

      use filename instead of directory under fileprovider

  • @Equality-and-Liberty
    @Equality-and-Liberty 2 года назад

    I have an issue with Traefik. Where can someone contact you?

  • @jeffreygreen7860
    @jeffreygreen7860 3 года назад

    Can a file provider configuration handle swarm mode too? I seem to be having problems deploying in that manner, not sure if the deploy/labels in the docker compose is then mandatory. (For all services, not just dashboard.)

    • @liyangau
      @liyangau  3 года назад +1

      Hi Jeffery, although I have not tested it yet, I think you must use docker provider in swarm mode. According to Traefik's documentation, doc.traefik.io/traefik/providers/docker/#routing-configuration-with-labels_1 , it seems that labels need to be used for routing.

    • @jeffreygreen7860
      @jeffreygreen7860 3 года назад

      Thanks Li. After fiddling with it, I was coming pretty much to that conclusion. I'll probably go without the swarm here since it isn't really strictly needed. I do (or will) have a need for it and was sort of hoping to get it going here so that the actual case that needs it would not be too much of a problem.

  • @andreicondurachi
    @andreicondurachi 2 года назад

    You do realize that it doesn't actually load the nginx index.html file? It's seems to be a routing issue. No matter what I do I keep getting '404 Not found".

    • @andreicondurachi
      @andreicondurachi 2 года назад

      I've just tested and it works if you start traefik as a linux process (e.g. systemd or traefik executable for quick testing), not from docker container.

  • @sanojdube4561
    @sanojdube4561 3 года назад

    Thanks a lot..is it possible to add a service without adding a router?

    • @liyangau
      @liyangau  3 года назад +1

      HI Sanoj, you can add as many services as you need without assigning a router. It is similar concept as in k8s which you defines service but not assigning ingress to it. Without a router, your service won't be exposed.

    • @sanojdube4561
      @sanojdube4561 3 года назад

      @@liyangau genius man..keep making such good videos on traefik..really the best fit which i was looking for..

    • @sanojdube4561
      @sanojdube4561 3 года назад

      @@liyangau i tried putting hostname as ip:port in dynamic.yaml but doesnt load my root service still😢

  • @user-sb7wu6hx3i
    @user-sb7wu6hx3i Год назад

    unfortunately you did not show any working example of config