Last active
April 6, 2025 13:04
-
-
Save vasekch/6fd41036b35204e8432fb1596fd4cd53 to your computer and use it in GitHub Desktop.
Minecraft server docker traefik configuration labels - pass TCP along with HTTP and HTTPS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
web: | |
image: ... | |
volumes: | |
... | |
labels: | |
- "traefik.enable=true" | |
# to enforce http port over tcp | |
- "traefik.http.services.web-minecraft.loadbalancer.server.port=80" | |
- "traefik.http.services.web-minecraft.loadbalancer.passhostheader=true" | |
- "traefik.http.routers.minecraft-http.rule=Host(`mc.example.com`)" | |
- "traefik.http.routers.minecraft-http.entrypoints=web" | |
- "traefik.http.routers.minecraft-http.middlewares=minecraft-redirect-https@docker" | |
- "traefik.http.middlewares.minecraft-redirect-https.redirectscheme.scheme=https" | |
- "traefik.http.middlewares.minecraft-redirect-https.redirectscheme.permanent=true" | |
- "traefik.http.routers.minecraft-https.rule=Host(`mc.example.com`)" | |
- "traefik.http.routers.minecraft-https.entrypoints=websecure" | |
- "traefik.http.routers.minecraft-https.tls=true" | |
- "traefik.http.routers.minecraft-https.tls.certresolver=letsencrypt" | |
- "traefik.tcp.routers.minecraft-tcp.rule=HostSNI(`*`)" | |
- "traefik.tcp.routers.minecraft-tcp.entrypoints=minecraft" | |
- "traefik.tcp.routers.minecraft-tcp.service=minecraft-tcp-svc" | |
- "traefik.tcp.services.minecraft-tcp-svc.loadbalancer.server.port=25565" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
minecraft-tcp-svc and minecraft-redirect-https@docker services you are not defined can you define pls ?