Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Redis UI on a subdirectory #43

Closed
vojtechzicha opened this issue Aug 31, 2020 · 10 comments
Closed

Running Redis UI on a subdirectory #43

vojtechzicha opened this issue Aug 31, 2020 · 10 comments
Labels
enhancement New feature or request has hack solution question Further information is requested

Comments

@vojtechzicha
Copy link

Hi,

I've tried deploying Redis UI to Kubernetes Ingress and I've stumbled upon an issue running on non-root path.

When published via following definition:

- path: /redis/(.*)
  backend:
    serviceName: redis-ui                                                                                                        
    servicePort: 7843

The application loads on https://example.com/redis/, but the JS and page itself still loads as https://example.com/bundle.js.

Usually in similar docker apps, there is an environment variable that can provide the path, but I cannot find any in this project.

Is there a way to run the app on non-root path?

If there is a hint where to do the change in code, I can try doing pull request but haven't find the right place, so any hints would be welcomed too.

@p3x-robot
Copy link
Member

it is a big refactor, i am not sure if i am going to implement, feature request is welcome....
you are easier to use a subdomain redis.example.com etc...

@p3x-robot p3x-robot added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed low priority question Further information is requested labels Aug 31, 2020
@p3x-robot
Copy link
Member

@p3x-robot p3x-robot reopened this Sep 6, 2020
@p3x-robot p3x-robot added wontfix This will not be worked on enhancement New feature or request help wanted Extra attention is needed low priority and removed enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed low priority question Further information is requested wontfix This will not be worked on labels Oct 6, 2020
@sergeyshaykhullin
Copy link
Contributor

sergeyshaykhullin commented Oct 7, 2020

@vojtechzicha If you use ingress-nginx you can use it to rewrite urls on routing

You have to add annotation to ingress

nginx.ingress.kubernetes.io/rewrite-target: /$2

And create path like this

- path: /myroute(/|$)(.*)
  backend:
    serviceName: myservice
    servicePort: http

Nginx will receive /myroute routes, rewrite them as they are / and pass to specified service

@p3x-robot p3x-robot added has hack solution and removed help wanted Extra attention is needed low priority labels Oct 7, 2020
@f2calv
Copy link

f2calv commented May 6, 2021

I can't get nginx rewrite working.

Sorry my client side dev skills are limited, but is it not possible to add the following to here?

<base href="./">

@p3x-robot
Copy link
Member

p3x-robot commented May 6, 2021

I can't get nginx rewrite working.

Sorry my client side dev skills are limited, but is it not possible to add the following to here?

<base href="./">

nope, other people could fix this issue

@f2calv
Copy link

f2calv commented May 6, 2021

So it's now working just not using rewrite below is my solution for next customer!
Note: I'm using Lets Encrypt TLS termination in my example;

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: redisui-ingress
  labels:
    app: redisui-ingress
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/app-root: /redis
spec:
  tls:
    - hosts:
        - www.example.com
      secretName: tls-secret-redisui
  rules:
    - host: www.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: redisui-svc
                port:
                  number: 7843

Official rewrite docs;

@p3x-robot p3x-robot added the question Further information is requested label Oct 21, 2021
@kafeg
Copy link

kafeg commented Feb 15, 2022

Tried your docker image, unfortunately it is impossible to use it with subfolder path.

So switched to the https://github.com/joeferner/redis-commander, this is also a good tool.

@p3x-robot
Copy link
Member

ok

@Tajmahal86
Copy link

It is a shame this does not have a solution in place.
I just switched from redis-commander to this since p3x has a much better interface IMO.
As a sometimes sys-admin I can say we tend to install these kinds of tools a lot in sub-directories and it is for sure a turndown for many users out there. I, myself was kind of disappointed not being able to proxy this easily with Traefik.
With that said I have another hacky hack in place if you are willing to run it that way - it is not pretty but it works.
You can see it here.

Thank you for the nice tool you built here!

@p3x-robot
Copy link
Member

It is a shame this does not have a solution in place. I just switched from redis-commander to this since p3x has a much better interface IMO. As a sometimes sys-admin I can say we tend to install these kinds of tools a lot in sub-directories and it is for sure a turndown for many users out there. I, myself was kind of disappointed not being able to proxy this easily with Traefik. With that said I have another hacky hack in place if you are willing to run it that way - it is not pretty but it works. You can see it here. Thank you for the nice tool you built here!

thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request has hack solution question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants