404 when using ingress on non-root path


Thanks for an awesome app.

I’m trying to deploy drone to Kubernetes and expose with an ingress. It works perfectly when using ingress on root path but when trying to use the ui it returns 404 on things like the css and the favicon.
This is an issue with the routing in the Vue SPA where it’s still trying to fetch /favicon.ico etc. It is quite easily solvable by adding some env variables to the Vue config.

My ingress looks like this:

apiVersion: extensions/v1beta1
kind: Ingress
  name: drone-ingress
    nginx.ingress.kubernetes.io/rewrite-target: /$1
  - hosts:
    - drone.company.se
    secretName: super-secret
  - host: drone.company.se
        - path: /drone/?(.*)
            serviceName: drone-service
            servicePort: 80

The fix for this issue would be to add the following in vue.config.js: publicPath: process.env.DRONE_UI_BASE_URL || '/' as well as changing the router instantiation base property to base: process.env.DRONE_UI_BASE_URL || '/'.

I understand that this is a very narrow use case and maybe outside of the scope for you, so I’m happy to provide a PR if that would help. If not, I’d love some guidance on how to build the docker image myself, I’ve been trying to find how the UI is embedded but haven’t found it yet.