speedtest-tracker: [Traefik2] Login page doesn't work under proxy
Currently trying to add a reverse proxy to my existing Speedtest Tracker install via docker-compose.yml
file.
docker-compose.yml file:
version: '3.3'
services:
speedtest-tracker:
container_name: speedtest-tracker
environment:
- PUID=1000
- PGID=1000
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=speedtest_tracker
- DB_USERNAME=speedy
- DB_PASSWORD=password
- TELEGRAM_BOT_TOKEN=XXXXXXXXXXX
volumes:
- ./config:/config
image: 'ghcr.io/alexjustesen/speedtest-tracker:latest'
restart: always
depends_on:
- db
networks:
- web
- internal
labels:
- traefik.enable=true
- traefik.http.routers.speedtest-tracker.rule=Host(`192.168.1.23`) && PathPrefix(`/speedtest-tracker`)
- traefik.http.services.speedtest-tracker.loadbalancer.server.port=80
- traefik.http.routers.speedtest-tracker.middlewares=speedtest-tracker-strip
- traefik.http.middlewares.speedtest-tracker-strip.stripprefix.prefixes=/speedtest-tracker
db:
image: mariadb:10
restart: always
environment:
- MARIADB_DATABASE=speedtest_tracker
- MARIADB_USER=XXXXXXXXXXXX
- MARIADB_PASSWORD=XXXXXXXXXXXX
- MARIADB_RANDOM_ROOT_PASSWORD=true
volumes:
- ./var_lib_mysql:/var/lib/mysql
networks:
- internal
labels:
- traefik.enable=false
networks:
web:
external: true
internal:
external: false
With the above file I can start my Speedtest Tracker instance:
except for that I cannot login: I type my credentials but it doesn’t redirect to the dashboard page.
Looking in the Developer Console, it seems that some resources (livewire.js
and inter.css
) aren’t loaded.
Is there any chance of fixing it?
Thanks in advance dreamwhite
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 16 (7 by maintainers)
Don’t worry uagliò, it’s simple. 😃
Your Traefik is not resolving names through PiHole probably. Check what DNS it is pointing to.
Anyway, I highly suggest you don’t use fritzbox as dhcp/dns, but use an external server, like your PiHole. Then every server/host/client in your LAN will be configured to point to the same DNS, and also docker services. So Traefik will also be able to resolve
MY_PRIVATE_DOMAIN.LTD
.In order for all homelab services to be served by Traefik, I basically configured a catch-all wildcard DNS entry in AdGuardHome (I prefer AGH vs PiHole), so that every service that is called (service1.domain.net, etc.) always gets resolved to the IP where Traefik is running. Then Traefik does its magic. BTW: this is a split-dns configuration, since I have a public domain, and externally I have the same catch-all address on public DNS resolving to my public IP, and it reaches Traefik internally in the same way. Basically, with split-dns it doesn’t matter if the request comes from the LAN or WAN, it always goes to Traefik. 😃
If you need support for Traefik etc., contact me on Discord (same username you see here).
Meanwhile, when you have time, watch this video, you’ll learn the basics: https://www.youtube.com/watch?v=liV3c9m_OX8
~I guess it’s an environment variable, right?~ Yeah it is, now the app works flawlessly. Attaching my docker-compose.yml file in case anyone is having the same issues as me setting up speedtest-tracker with traefik on a local domain:
So you have a DNS server: PiHole. 😃 And maybe you also use it as DHCP server.
Did you know that PiHole is a DNS server / forwarder?
Sì pure paesan… #ForzaNapoliSempre 😄