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.
@@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)?
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!
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.
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!
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.
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!