Manage multiple sites with Docker Compose and Traefik

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ • 54

  • @aschmelyun
    @aschmelyun  2 роки тому +15

    You can find the source code for the video as well as some more info on this GitHub repo: github.com/aschmelyun/docker-compose-traefik

    • @ltayn
      @ltayn 2 роки тому

      can you do a tutorial on laravel 9 vite docker vue3? when i am trying to get this working it is going insanely slow. Note i am using wsl.

    • @aasthagupta2165
      @aasthagupta2165 2 роки тому

      thanku so much

  • @stevecampbell8697
    @stevecampbell8697 Рік тому +3

    This is the easiest to understand guide on setting up Traefik with an app that I've found. Thanks!

    • @aschmelyun
      @aschmelyun  Рік тому

      I'm glad you liked it! Appreciate the kind words.

  • @achaabni
    @achaabni 3 місяці тому +1

    bravo you are the useful Traefik youtuber after watching plenty of cases but they introduce another project or external tool

  • @Patrick-et2bq
    @Patrick-et2bq 3 місяці тому

    Great video, thank you so much. I have been putting off looking into reverse proxies for a while because I was afraid it would be a daunting task; this made it very approachable.

  • @mihajlom1k1
    @mihajlom1k1 Рік тому +3

    Very helpful tutorial for using traefik locally, thanks a lot!

  • @Henry-vr6zr
    @Henry-vr6zr Рік тому +2

    Best explanation yet! Thanks so much.

    • @aschmelyun
      @aschmelyun  Рік тому +1

      Glad it was helpful!

    • @Henry-vr6zr
      @Henry-vr6zr Рік тому

      @@aschmelyun One question, however - if I had a NextJS 13 application with a node.js (Express) Backend - and they were both proxied under e.g. Traefik or Nginx so that to get to the site the url would just be e.g. "localhost" and to make requests to the (proxied) backend it'd be "localhost/api" (the same port as the site) - how would I fetch data inside of my app if the RSC is fetching the data server-side so won't be able to make the request through the proxied API? If that makes sense 😅
      TL;DR - how in my Next app can I fetch data from my proxied backend both in client components (that can only access the API through the proxy) and also in server components (that can only access the API in the internal Docker network, not through the proxy)?

  • @xe3333
    @xe3333 2 роки тому +3

    Just in time . Thanks 🙌

  • @viniciusalvess
    @viniciusalvess 7 місяців тому

    Thank you Andrew, this is a very valuable video!

  • @kinvain
    @kinvain Рік тому +2

    Is it important to keep different "ports" section in application service? Or it could be changed to the same ports "80:80" for instance?

  • @vitusyu9583
    @vitusyu9583 6 місяців тому

    But seems you have missed out the part of the DNS resolution required to enable the browser to resolve the URL. or, I have missed something you did mention?
    Thx!

  • @ruslanvoroshchukowlookitlt245
    @ruslanvoroshchukowlookitlt245 2 роки тому +2

    Hi Andrew, thanks for continuing the sharing a very actual stuff. Could you please guide me on how to set up Traefik correctly to get access to the services from other devices on my local network? The use case is when we need to test the localhost on a native mobile / tablet OS. Thank you!

  • @KaMZaTa
    @KaMZaTa 2 роки тому +1

    Let's say I have 1 stack with 2 containers and another stack with 1 container. How can I isolate the stacks behind Traefik?

  • @mickvanbreukelen7445
    @mickvanbreukelen7445 5 місяців тому

    Do you need to run 'a traefik' per stack?
    What if I want to run multiple services, from multiple stacks. Can that work with only running Traefik once?

    • @kodedart2311
      @kodedart2311 3 місяці тому +1

      Run one instance of traefik. Then in each of your projects (i.e. dockerized apps) enable traefik, for each service (app). Note that your containers must run in the same network as traefik. So basically the same as in the video, without the "traefik" service.

  • @alifallahrn
    @alifallahrn 2 роки тому +1

    Thanks! It was very helpful! ❤

  • @durgeshkshirsagar116
    @durgeshkshirsagar116 5 місяців тому

    Could you please create a video on setting ssl for traefik.
    Thank you for simple and clear video 🎉🎉

  • @huriorko
    @huriorko 2 роки тому +1

    Thanks for doing that!!

  • @RuelLuna
    @RuelLuna 2 роки тому +1

    how to use this on laravel sail?

    • @aschmelyun
      @aschmelyun  2 роки тому +3

      You'll have to make changes to the docker-compose.yml file that Sail generates. I'm writing up a blog article about how exactly to do this, so keep an eye out for it!

  • @VitorJustin
    @VitorJustin 2 роки тому +1

    Great video! Tks

  • @wushutebessa
    @wushutebessa 2 роки тому +5

    I think I prefer ngnix proxy manager

  • @atiqbaqi
    @atiqbaqi Рік тому

    very helpful video.

  • @davbaster
    @davbaster Рік тому

    Thanks for the tutorial

  • @pieterrossouw8596
    @pieterrossouw8596 Рік тому +2

    Nginx seems to be faster (lower resource utilization or higher traffic before dropping requests). Passing in that docker socket as a volume also greatly increases the severity of exploitation if your version of the container becomes vulnerable. That said, nginx configuration files can be finicky so tomato potato. I'll just use both.

    • @Osys91
      @Osys91 Рік тому

      Don't forget that traefik gives the ability to get an SSL cert out of the box when the container goes up.

  •  2 роки тому +1

    Awesome!

  • @saragasmichalis2177
    @saragasmichalis2177 Рік тому

    Super useful!!

  • @cholasimmons
    @cholasimmons 4 місяці тому

    i had this working perfectly til i decided to add 2 domains under the same server, i installed a second Traefik and now both have stopped working,

  • @memack101
    @memack101 2 роки тому +1

    Thanks.

  • @principe.borodin
    @principe.borodin Рік тому

    awesome.
    wonderful.

  • @chris.dillon
    @chris.dillon Рік тому

    So, instead of like a vite dev server proxy for dev? Hmm.

  • @topalek
    @topalek 2 роки тому +1

    awesome

  • @inteliconn995
    @inteliconn995 Рік тому

    Thanks!

  • @scwan-ew8uh
    @scwan-ew8uh Рік тому

    Show me the javascriptdockerfile

  • @waqaszafar9559
    @waqaszafar9559 2 роки тому

    good stuff.. when we are gonna see some kubernetes stuff videos on this channel.

    • @aschmelyun
      @aschmelyun  2 роки тому

      As soon as I take some time to learn more about it, there's a lot to learn!

  • @namename8986
    @namename8986 5 місяців тому

    this does not work whatsoever for me

  • @GerardoBelot
    @GerardoBelot 11 місяців тому

    NO more than a like becouse I can't, thank for the video!!!

  • @navanshu
    @navanshu 6 місяців тому

    Different port is same domain not different

  • @derfic
    @derfic 2 роки тому +1

    Hello, nginx proxy is more powerful and useful 🙂 but without beautiful web gui

    • @AinzOoalG0wn
      @AinzOoalG0wn 2 роки тому

      more powerful in what way?

    • @jayp9158
      @jayp9158 Рік тому +1

      I just understood "I'm too dumb and lazy to understand this new Technology so I will stick with Nginx"

    • @derfic
      @derfic Рік тому +1

      @@jayp9158 new technologies appear every day, but most of them sucks 🤷🏻‍♂️

    • @joedrezden
      @joedrezden Рік тому

      Could nginx proxy ssh connections? I don't.

    • @derfic
      @derfic Рік тому

      @@joedrezden lol, we speak about redirects of http traffic