tailscale-dev / docker-mod

The home for our universal Docker mod
BSD 3-Clause "New" or "Revised" License
47 stars 26 forks source link

Docker mod connection always uses relay #3

Open rdmchr opened 1 year ago

rdmchr commented 1 year ago

I have tailscale installed on the server itself and one container using the docker mod (the container is on the same server). When I connect to the server itself and use tailscale status I see the following output:

100.64.209.68   node-one             marc@        linux   active; direct [:::::2]:41641

But when I connect to the docker container I get this output:

100.117.194.108 jellyfin             tagged-devices linux   active; relay "mia"

As you can see I'm trying to run Jellyfin, which doesn't work correctly over the slow relay connection. Here is my docker-compose.yml

services:
  jellyfin:
    image: linuxserver/jellyfin:10.8.9
    container_name: jellyfin
    hostname: jellyfin
    networks:
      - traefik-network
    volumes:
      - data:/config
      - tailscale:/var/lib/tailscale
    restart: unless-stopped
    environment:
      - PUID=911
      - PGID=1001
      - TZ=Etc/UTC
      - DOCKER_MODS=ghcr.io/tailscale-dev/docker-mod:main
      - TAILSCALE_STATE_DIR=/var/lib/tailscale
      - TAILSCALE_SERVE_MODE=https
      - TAILSCALE_SERVE_PORT=80
      - TAILSCALE_USE_SSH=0
      - TAILSCALE_HOSTNAME=jellyfin
      - TAILSCALE_AUTHKEY=
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.jellyfin.rule=Host(``)"
      - "traefik.http.routers.jellyfin.entrypoints=websecure"
      - "traefik.http.routers.jellyfin.tls.certresolver=le"
      - "traefik.http.routers.jellyfin.middlewares=authentik-proxy@docker"
      - "traefik.http.services.jellyfin.loadbalancer.server.port=80"

networks:
  traefik-network:
    external: true
    name: traefik

volumes:
  data:
    external: true
    name: jellyfin_data
  tailscale:

Is the traefik network interfering with the Tailscale connection? If so, is there any work around that would still allow me to use traefik?