Manage multiple sites with Docker Compose and Traefik

preview_player
Показать описание
In this 9 minute video, I'll show you how I use Traefik Proxy in my local Docker environment to route web traffic to app services running in separate containers, on different ports. This is a basic example of a reverse proxy and uses a ready-made image from the Docker Hub!

You'll learn:
- What a good use case for a reverse proxy is
- How to add a Traefik container to your Docker Compose setup
- To route traffic from the browser to a specific Docker container

- 0:00 The setup
- 1:14 Adding Traefik
- 4:08 Routing with host names
- 6:03 Using PathPrefix
- 7:54 That's all

Рекомендации по теме
Комментарии
Автор

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

stevecampbell
Автор

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

mihajlomk
Автор

Thank you Andrew, this is a very valuable video!

viniciusalvess
Автор

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!

ruslanvoroshchukowlookitlt
Автор

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

kinvain
Автор

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!

vitusyu
Автор

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

KaMZaTa
Автор

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.

pieterrossouw
Автор

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

GerardoBelot
Автор

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

chris.dillon
Автор

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

waqaszafar
Автор

Different port is same domain not different

navanshu
Автор

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

derfic