pascalandy / docker-stack-this

A Docker Stack that just work. With Traefik, Socat, Portainer, Nginx, Caddy, Whoami
Other
167 stars 26 forks source link

Redirect like Portainer #17

Closed joserochadocarmo closed 5 years ago

joserochadocarmo commented 5 years ago

Is it possible to do the same thing you did with the Portainer redirection using Pgadmin4? I'm trying to do this, but it always redirects to http://127.0.0.1/login?next=%2F and I want this: http://127.0.0.1/pgadmin4/login?next=%2F

pgadmin4:
    <<: *default-opts
    image: dpage/pgadmin4
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@admin.com
      PGADMIN_DEFAULT_PASSWORD: admin
    networks:
      - ntw_front
      - portainer
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role==manager]
      restart_policy:
        condition: on-failure
      resources:
        limits:
          cpus: '0.50'
          memory: 128M
        reservations:
          memory: 9M
      labels:
        - "traefik.backend=pgadmin4"
        - "traefik.frontend.rule=PathPrefixStrip:/pgadmin4"
        - "traefik.port=80"
        - "traefik.enable=true"
        - "traefik.passHostHeader=true"
        - "traefik.docker.network=ntw_front"
        - "traefik.weight=10"
        - "traefik.backend.loadbalancer.swarm=true"
        - "traefik.backend.loadbalancer.method=drr"
        ## Bug fix / https://github.com/containous/traefik/issues/563#issuecomment-421360934
        - "traefik.frontend.redirect.regex=^(.*)/pgadmin4$$"
        - "traefik.frontend.redirect.replacement=$$1/pgadmin4/"
        - "traefik.frontend.rule=PathPrefix:/pgadmin4;ReplacePathRegex: ^/pgadmin4/(.*) /$$1"
pascalandy commented 5 years ago

Sorry, I can't help here. I would suggest to go to Traefik community for this.