How to get Apache Superset to run on a specified path

≯℡__Kan透↙ 提交于 2019-12-11 01:46:09

问题


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.


回答1:


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.




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/50880431/how-to-get-apache-superset-to-run-on-a-specified-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!