Flask + Bokeh IIS

Hi guys,

I am trying to deploy my web application(Flask + embedded Bokeh server) on windows IIS, Can I get any suggestions? So far, I do not have any ideas on it.

Thanks a lot

Hi,

May I ask how did you embed flask into your Bokeh ? I have a fully working Bokeh application, and I am curious as to how to embed Flask into it so I can deploy it.

Here is a link that may be helpful: Deploying Python web app (Flask) in Windows Server (IIS) using FastCGI | by Bilal Bayasut | Medium

Looking forward to hearing back,

Best,

···

On Monday, July 2, 2018 at 7:08:34 PM UTC+3, peng wang wrote:

Hi guys,

I am trying to deploy my web application(Flask + embedded Bokeh server) on windows IIS, Can I get any suggestions? So far, I do not have any ideas on it.

Thanks a lot

Hi there,

What a bright day, I am so glad to hear from you about this great link on Flask(IIS) deployment. My application is a Flask web application, and I embedded Bokeh Server in Flask. If you like, please refer to the following source code. I tried to deploy it on Herku, unfortunately, by default, Herku only allows one websocket, any cross websocket are prohibited on free version. So far, I do know my application can be deployed on DigitalOcean.

Thanks again.

runserver.py

“”"

This script runs the DataVisualizationWebApp application using a development server.

“”"

from os import environ

from DataVisualizationWebApp import app, views

from threading import Thread

import socket

Thread(target=views.bk_worker).start()

if name == ‘main’:

app.run(port=8080)

``

views.py

#paramater

@app.route(‘/’, methods=[‘GET’])

def bkapp_page():

“”“Renders the home page.”“”

script = server_document(‘http://localhost:5006/bkapp’)

return render_template(“embed.html”, script=script, template=“Flask”)

def bk_worker():

Can’t pass num_procs > 1 in this configuration. If you need to run multiple

processes, see e.g. flask_gunicorn_embed.py

server = Server({‘/bkapp’: bk_plter.plot_doc}, io_loop=IOLoop(), allow_websocket_origin=[“localhost:8080”])

server.start()

server.io_loop.start()

``

embed.html

<!doctype html>

Embedding a Bokeh Server With {{ framework }}

{{ script|safe }}

``

···

On Tuesday, July 3, 2018 at 7:26:35 AM UTC-6, Ayman Alkhalaf wrote:

Hi,

May I ask how did you embed flask into your Bokeh ? I have a fully working Bokeh application, and I am curious as to how to embed Flask into it so I can deploy it.

Here is a link that may be helpful: https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8

Looking forward to hearing back,

Best,

On Monday, July 2, 2018 at 7:08:34 PM UTC+3, peng wang wrote:

Hi guys,

I am trying to deploy my web application(Flask + embedded Bokeh server) on windows IIS, Can I get any suggestions? So far, I do not have any ideas on it.

Thanks a lot

Hi Ayman,

I read through the post. it is great. I just have one question: how can I deploy or launch Bokeh server on IIS after I followed steps and installed Flask on IIS? or is it really possible to deploy Bokeh server on IIS ? highly appreciate any feedback.

···

On Tuesday, July 3, 2018 at 7:26:35 AM UTC-6, Ayman Alkhalaf wrote:

Hi,

May I ask how did you embed flask into your Bokeh ? I have a fully working Bokeh application, and I am curious as to how to embed Flask into it so I can deploy it.

Here is a link that may be helpful: https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8

Looking forward to hearing back,

Best,

On Monday, July 2, 2018 at 7:08:34 PM UTC+3, peng wang wrote:

Hi guys,

I am trying to deploy my web application(Flask + embedded Bokeh server) on windows IIS, Can I get any suggestions? So far, I do not have any ideas on it.

Thanks a lot

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#userguide-server-deployment

It is also possible to create and control an IOLoop directly. This can be useful to create standalone “normal” python scripts that serve Bokeh apps, or to embed a Bokeh application into a framework like Flask or Django without having to run a separate Bokeh server process.

After read the Doc, I am confused what the colored sentence means? Let us say, if I embed Bokeh server into flask(auto_server(), start()) and launch flask web application, does that mean that I do not need to manually launch “bokeh serve” command?

thanks for any feedback

···

On Tuesday, July 3, 2018 at 8:53:15 AM UTC-6, peng wang wrote:

Hi Ayman,

I read through the post. it is great. I just have one question: how can I deploy or launch Bokeh server on IIS after I followed steps and installed Flask on IIS? or is it really possible to deploy Bokeh server on IIS ? highly appreciate any feedback.

On Tuesday, July 3, 2018 at 7:26:35 AM UTC-6, Ayman Alkhalaf wrote:

Hi,

May I ask how did you embed flask into your Bokeh ? I have a fully working Bokeh application, and I am curious as to how to embed Flask into it so I can deploy it.

Here is a link that may be helpful: https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8

Looking forward to hearing back,

Best,

On Monday, July 2, 2018 at 7:08:34 PM UTC+3, peng wang wrote:

Hi guys,

I am trying to deploy my web application(Flask + embedded Bokeh server) on windows IIS, Can I get any suggestions? So far, I do not have any ideas on it.

Thanks a lot

Totally done

···

On Tuesday, July 3, 2018 at 11:45:36 AM UTC-6, peng wang wrote:

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#userguide-server-deployment

It is also possible to create and control an IOLoop directly. This can be useful to create standalone “normal” python scripts that serve Bokeh apps, or to embed a Bokeh application into a framework like Flask or Django without having to run a separate Bokeh server process.

After read the Doc, I am confused what the colored sentence means? Let us say, if I embed Bokeh server into flask(auto_server(), start()) and launch flask web application, does that mean that I do not need to manually launch “bokeh serve” command?

thanks for any feedback

On Tuesday, July 3, 2018 at 8:53:15 AM UTC-6, peng wang wrote:

Hi Ayman,

I read through the post. it is great. I just have one question: how can I deploy or launch Bokeh server on IIS after I followed steps and installed Flask on IIS? or is it really possible to deploy Bokeh server on IIS ? highly appreciate any feedback.

On Tuesday, July 3, 2018 at 7:26:35 AM UTC-6, Ayman Alkhalaf wrote:

Hi,

May I ask how did you embed flask into your Bokeh ? I have a fully working Bokeh application, and I am curious as to how to embed Flask into it so I can deploy it.

Here is a link that may be helpful: https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8

Looking forward to hearing back,

Best,

On Monday, July 2, 2018 at 7:08:34 PM UTC+3, peng wang wrote:

Hi guys,

I am trying to deploy my web application(Flask + embedded Bokeh server) on windows IIS, Can I get any suggestions? So far, I do not have any ideas on it.

Thanks a lot