cuigh / swirl

A web UI for Docker, focused on swarm cluster.
MIT License
616 stars 80 forks source link

swirl behind traefik? #55

Open emboss64 opened 1 year ago

emboss64 commented 1 year ago

I was wondering if anyone ever tried using swirl behind traefik, as I have not found a way to make it work with a base path other than / as the ui has all the references pointing to that.

This is the traefik config I'm trying to use:

    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.swirl.entrypoints=https"
        - "traefik.http.routers.swirl.tls=true"
        - "traefik.http.services.swirl.loadbalancer.server.port=8001"
        - "traefik.http.routers.swirl.rule=PathPrefix(`/swirl`)"
        - "traefik.http.routers.swirl.middlewares=swirl-stripprefix"
        - "traefik.http.middlewares.swirl-stripprefix.stripprefix.prefixes=/swirl"
        - "traefik.http.middlewares.swirl-stripprefix.stripprefix.forceslash=true"
nexovec commented 1 year ago

I'm not sure this will be helpful, but I did try running swirl with traefik and after 2 weeks of not even being able to recognize services properly. I ultimately ended up replacing it with apache web server.

But still, here are some things that might help:

The labels do look correct, but as I've said, I couldn't do it either.

emboss64 commented 1 year ago

Yup, it's not really a problem of the ingress config but of swirl not being able to handle a path other than the root path as it's base path

I'll have to give this experimental plugin a go: https://github.com/traefik/plugin-rewritebody

nexovec commented 1 year ago

Is it possible for you to paste your swirl and traefik docker compose labels in here?