I am trying to deploy a web application in a docker swarm. I am using Traefik as it allows for session stickiness. As a front-end rule, I have included : "traefik.frontend.rule=PathPrefixStrip: /TestManager"
/TestManager is the name of my service. However, when I try to navigate to /TestManager, I get a bad gateway.
Here's my Traefik dashboard : Traefik Dashboard
I am not sure if I need to edit the front-end rule or the back end rule for the TestManager page to display.
And here's my docker-compose file:
version: '3'
services:
testmanager:
image: 10.244.102.10:5000/testmanager
networks:
- net
deploy:
mode: replicated
replicas: 3
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
labels:
- "traefik.docker.network=autoframework_net"
- "traefik.port=80"
- "traefik.backend=testmanager"
- "traefik.frontend.rule=PathPrefixStrip: /TestManager"
- "traefik.backend.loadbalancer.sticky=true"
ports:
- "8080"
loadbalancer:
image: traefik
command: --docker \
--docker.swarmmode \
--docker.watch \
--web \
--loglevel=DEBUG
ports:
- 80:80
- 9090:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
restart_policy:
condition: any
mode: replicated
replicas: 1
update_config:
delay: 2s
placement:
constraints: [node.role == manager]
networks:
- net
networks: net: