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

Allow to set address with panel.serve #1364

Closed
MarcSkovMadsen opened this issue May 22, 2020 · 2 comments · Fixed by #1435
Closed

Allow to set address with panel.serve #1364

MarcSkovMadsen opened this issue May 22, 2020 · 2 comments · Fixed by #1435
Labels
type: docs Related to the Panel documentation and examples

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented May 22, 2020

My Pain

I'm working on a major refactor of awesome-panel.org where I would like to enable serving a set of Panel applications on individual urls.

  • The main app should be served at / and not as today at /app.
  • I would like to serve for the material theme builder at /themebuilder
  • I would like to serve the awesome panel designer at /designer
  • I would like to be able to serve more aps at /app-name in the future.

The only way I can achieve this is via panel.serve I believe. But as my application runs in a docker container I need to be able to set the address to 0.0.0.0. This is currently not possible to do.

(I can set the port to 80 though. That is also needed for deployment to Azure).

Solution

Enable specifying the address when running panel.serve.

The serving command would then be something like

pn.serve(APP_ROUTES, address="0.0.0.0", port=80, dev=False, title="Awesome Panel")
@philippjfr
Copy link
Member

I may be confused but I think the keyword you're looking for is websocket_origin.

@MarcSkovMadsen
Copy link
Collaborator Author

Setting address does it. It just not documented.

Problem solved.

@philippjfr philippjfr added type: docs Related to the Panel documentation and examples and removed TRIAGE Default label for untriaged issues labels Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Related to the Panel documentation and examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants