How to get Apache Superset to run on a specified path
Asked Answered
I

3

6

I am running Apache Superset at the following address:

http://superset.example.com:8088

That gets redirected to:

http://superset.example.com:8088/superset/welcome

Ideally, users would get redirected to:

http://superset.example.com:8088/welcome

How can that be accomplished? As well I would like for it to run under port 80 so the port doesn't need to be specified but I haven't been able to do that either.

Impressionist answered 15/6, 2018 at 17:44 Comment(1)
That URL prefix is defined in the source code, so you would have to use some proxy method or change the source. Use the -p options to change the port.Soave
K
3

This issue covers what you're talking about:

https://github.com/apache/incubator-superset/issues/985

which led to this closed PR:

https://github.com/apache/incubator-superset/pull/1866

You can try to reopen the PR and finish it, or you can try configuring nginx like this guy suggests.

Kauri answered 21/6, 2018 at 12:54 Comment(0)
P
3

I found it very frustrating to setup a base url for superset. If you want to save some time, I condensed a couple of comments into a working example here: https://github.com/komoot/superset-reverse-nginx-example

Pericranium answered 24/9, 2019 at 12:9 Comment(0)
A
1

Below is the way I eventually made it to run on an endpoint other than '/'. But my use case is to make it work on AWS Lambda in Serverless environment.

Eventually what i did was the below to make it work:

  1. In config.py i have added another configuration variable and used this variable in locations where redirect or appbuilder.add_link has been used.
  2. In templates folder there are places where directly '/superset/' has been used. So, even if i did first step right, the templates are not rendering in right way. So, i have to go and change the template as well (As of now I have hard-coded this. I need to make it configurable)
  3. In front-end i have added a file called config.ts and I have used this config in locations wherever redirect was done in front-end. This has fixed up all my front-end links.
  4. Only thing remaining for me was fixing "Upload CSV to Database" Link. When we click this link and enter the data, since Lambda doesn't allow any writes i tried to write to /tmp - but since we don't know whether the next request is going to be served by same lambda or not... so this is an issue as of now. The way I am planning to fix this is to write the files to s3 instead of local folder. I am still figuring out a way to do this.

-- No more nginx or other links. We don't even need gunicorn in this setup.

Thanks

Ammann answered 25/2, 2019 at 20:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.