Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUBLIC_PATH + Traefik not mixing well #865

Open
adrianipopescu opened this issue Dec 4, 2024 · 0 comments
Open

PUBLIC_PATH + Traefik not mixing well #865

adrianipopescu opened this issue Dec 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@adrianipopescu
Copy link

Expected Behavior

Docker on Debian setup, relatively straight forward, want to host the app on a specific path on a subdomain.

I configured traefik to act as a reverse proxy for the app, I added the Host and PathPrefix to Traefik, seemed to have mapped correctly, the app doesn't fail but instead does a permanent redirect from /whatever to fullhostname:PORT/whatever, which doesn't work as I didn't forward those ports from the docker network.

Compose File [relevant section]:

  feishin:
    image: ghcr.io/jeffvli/feishin:latest
    container_name: feishin
    hostname: feishin
    #user: ${UID}:${GID}
    environment:
      SERVER_NAME: spotify@home
      SERVER_TYPE: navidrome
      SERVER_URL: https://${ENV_SD}.${ENV_DOMAIN}/music/
      SERVER_LOCK: "true"
      PUBLIC_PATH: /vibe
      PUID: ${UID}
      PGID: ${GID}
      TZ: ${TZ}
    networks:
      - proxy
      - media
    labels:
      - traefik.enable=true
      - traefik.docker.network=proxy
      - traefik.http.routers.feishin.rule=Host("${ENV_SD}.${ENV_DOMAIN}") && PathPrefix("/vibe")
      - traefik.http.routers.feishin.entrypoints=https
      - traefik.http.services.feishin.loadbalancer.server.port=9180

      - homepage.group=Media
      - homepage.name=Feishin
      - homepage.icon=feishin.svg
      - homepage.href=https://${ENV_SD}.${ENV_DOMAIN}/vibe/
      - homepage.description=Subsonic Web Player
    restart: unless-stopped

Current Behavior

Clicking on the homepage url aka https://sub.domain.com/vibe just redirects me to the http://sub.domain.com:9180/vibe/

Steps to Reproduce

Logs for good measure

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/settings.js.template to /etc/nginx/conf.d/settings.js
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/12/04 21:36:26 [notice] 1#1: using the "epoll" event method
2024/12/04 21:36:26 [notice] 1#1: nginx/1.27.2
2024/12/04 21:36:26 [notice] 1#1: built by gcc 13.2.1 20240309 (Alpine 13.2.1_git20240309) 
2024/12/04 21:36:26 [notice] 1#1: OS: Linux 6.8.12-2-pve
2024/12/04 21:36:26 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/12/04 21:36:26 [notice] 1#1: start worker processes
2024/12/04 21:36:26 [notice] 1#1: start worker process 38
2024/12/04 21:36:26 [notice] 1#1: start worker process 39

Possible Solution

No response

Context

No response

Application version

0.12.1

Operating System and version

Debian + Docker

Server and Version

Navidrome 0.53.3

Node Version (if developing locally)

No response

@adrianipopescu adrianipopescu added the bug Something isn't working label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant