I'm running ubooquity in a swarm, and when trying to use the AddPrefix, it does not seem to work.
What I am expecting:
type in ebook.home
and get directed to the /ubooquity/admin
prefix I have added in my rules.
What I am getting:
I get a the login page, but its not rendered(?) properly. There are errors in the browser console saying that The stylesheet https://ebook.home/ubooquity/admin-res/angular-material.min.css was not loaded because its MIME type, “text/html”, is not “text/css”
If I remove the add prefix rule, and manually type the path it, everything works, ebook.home/ubooquity/admin
the page loads correctly. So I'm not sure where things are going wrong.
When the page does load, I notice content type of the response header is application/javascript
, is there something special to make this work through a reverse proxy?
ubooquity compose
version: '3'
services:
ubooquity:
image: ghcr.io/linuxserver/ubooquity
networks:
- traefik-public
deploy:
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.constraint-label=traefik-public"
- "traefik.http.routers.ubooquity-http.rule=Host(`ebook.home`)"
- "traefik.http.routers.ubooquity-http.entrypoints=http"
- "traefik.http.routers.ubooquity-http.middlewares=https-redirect"
- "traefik.http.routers.ubooquity-https.rule=Host(`ebook.home`)"
- "traefik.http.routers.ubooquity-https.entrypoints=https"
- "traefik.http.routers.ubooquity-https.tls=true"
- "traefik.http.routers.ubooquity-https.tls.certresolver=le"
- "traefik.http.services.ubooquity.loadbalancer.server.port=2203"
#redirect base URL to url/admin
- "traefik.http.middlewares.ubooquity-addprefix.addprefix.prefix=/ubooquity/admin"
##COMMENT OUT THESE LINES TO MAKE THE PAGE LOAD
#chain the middleware together
- "traefik.http.middlewares.ubooquity-https-chain.chain.middlewares=ubooquity-addprefix"
#add the chain to the https router
- "traefik.http.routers.ubooquity-https.middlewares=ubooquity-https-chain@docker"
networks:
traefik-public:
external: true
Also, I knew nothing about docker or web dev 5 days ago, so my terminology might be a little lacking. Thanks!