swirl
swirl copied to clipboard
swirl behind traefik?
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"
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:
- Make sure swirl and traefik are on the same docker network.
- Try to run it locally in docker-compose with docker as a provider.
- Make sure you have set the provider to swarm correctly(not just docker).
- Check the service is even visible at all in the traefik dashboard.
The labels do look correct, but as I've said, I couldn't do it either.
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
Is it possible for you to paste your swirl and traefik docker compose labels in here?