27
Traefik tutorials? (programming.dev)

I'm migrating my server to a new server and wanna try something new. I've been using nginx to reverse proxy my stuff and I recently heard about traefik being able to read labels off docker containers. I've been googling around but I can't for the life of me figure out how to get the access to the dashboard without having insecure mode on.

top 12 comments
sorted by: hot top controversial new old
[-] radiated@lemm.ee 6 points 1 year ago
[-] saddlebag@lemmy.world 6 points 1 year ago

Personally I’ve used traefik, Nginx and caddy. They’re all interesting in their own ways. My little docker setup is currently using caddy-docker-proxy. It’s been set and forget for me. You might need some adjustments based on your TLS requirements etc.

[-] Kangie@lemmy.srcfiles.zip 4 points 1 year ago* (last edited 1 year ago)

Insecure mode is enabling the dashboard.

Edit: if you get stuck here's a quick demo Lemmy config. I have a traefik 3.0 instance setup there as well.

[-] Still@programming.dev 1 points 1 year ago

ah ok, I got it working now, guess I have to use an nginx container anyway to host static stuff tho, the config being attached to a container is def a nice thing

[-] white_dwarf@lemmy.world 3 points 1 year ago
[-] PipedLinkBot@feddit.rocks 8 points 1 year ago

Here is an alternative Piped link(s): https://piped.video/wLrmmh1eI94

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source, check me out at GitHub.

[-] Still@programming.dev 2 points 1 year ago

man, how did I not find that, that was just what I was looking for.

[-] NewDataEngineer@lemmy.world 2 points 1 year ago

For those using traefik I would recommend the dynamic file config. You don't have to take down your containers just to change a proxy setting.

[-] Kangie@lemmy.srcfiles.zip 1 points 1 year ago

With labels you just update the service definition by redeploying the stack; the dynamic file provider adds nothing in most circumstances.

You certainly don't need to take down your container except to change things that are part of the Traefik static configuration.

[-] NewDataEngineer@lemmy.world 1 points 1 year ago

by redeploying the stack

That's the point. With dynamic files you can add new Middleware or even route already exposed ports all on the fly. You're telling me you can change a docker label and keep your service running with 0 downtime?

If you've figured that out please share a link because my experience has been otherwise.

[-] Kangie@lemmy.srcfiles.zip 1 points 1 year ago* (last edited 1 year ago)

Close enough to 0 downtime that it doesn't matter.

  1. Deploy updated stack file to existing stack
  2. existing services are updated
  3. Traefik polls the docker socket and notices updated labels
  4. ???
  5. Profit!

Seriously, you shouldn't need to put anything (outside of rules that you want to re-use [e.g. http->https middleware]) in the traefik dynamic configuration because each container/service in a docker stack will bring with it its own configuration. Your only 'dead time' is how long it takes Traefik to pick up the new dynamic configuration via either the docker or swarm providers, which is configurable but I've never had to touch because, even on production systems, it's been fine.

[-] fireshell@lemmy.world 1 points 1 year ago

you can also try Varnish cache is a web application accelerator that is used as caching HTTP reverse proxy.

load more comments
view more: next ›
this post was submitted on 15 Jul 2023
27 points (88.6% liked)

Selfhosted

39677 readers
355 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS