Hybrid system in one domain section IHybrid system in one domain section I

Question:

How do you deploy a hybrid system , saying that mixing WordPress CMS with Flask applications, in one domain ?

Yes. I am using Hybrid architect for the domain. You may ask why I should do with this complex ? My answer is quite simple, to make things done easily. See Flask app demo.

How is that ? Imaging that you are running CMS, like blogs, and eCommerce with WooCommerce. The best solution is to deploy these systems in WordPress. See ! it is just a piece of cakes if you know WordPress well.

But what if adding a Flask application to the architect? It is a common practice if you wanna run a customized application for your own. The limitation is you have only one domain.

Yes. You have only one domain to run multiple applications. Is it possible? Let me show my designed architect.

site architect

In the figure above, users could access your systems through a single web server, built on Apache. However, there are 3 applications behind the scenes. One is a blog , eCommerce is another, and Flask app goes next.

The blog and the eCommerce sites are built on WordPress, which is not difficult at all. For demo purpose, Flask app is simple one as well. In the long run, I will build a Stock analysis site to replace this simple Flask app.

All these applications will all connect to MySQL server. Flask app utilize WSGI to work with Apache web server.

Summarize the advantages of Hybrid system:

  1. You could install all of your applications in one domain to enrich your sites and save your money. Take this site for example, comhawk.com, based on WordPress, we could easily build one blog site and one eCommerce site. Meanwhile, we could also build Flask applications for complex systems, like data analysis and stock analysis.
  2. Apache supports the function of https (SSL). One setting for all applications, which saves a lot efforts.
  3. Apache is the only one which control the all the applications. Through it, you could start applications up or shut them down all together. Not necessary for you to configure Flask Applications as services one by one.

In the following post, I will give you briefing how to do this configuration.

Leave a Reply

Your email address will not be published.

Apache2

如何在 Ubuntu 上使用一個IP,多個網域的設定如何在 Ubuntu 上使用一個IP,多個網域的設定

Know-How 在 Apache2 上, 如何使用多個網域, Domains, 指向同一台機器或 IP 你想了解的是… 對網站開發或管理人員來說, 資料的管理與運用, 是你重要的績效.  不管是來自客戶, 或是來自於你的主管的要求. 希望你可以在同一台主機上, 安裝多個網站. 讓資源做最大的利用. 以下我會針對不同的場景, 來解釋如何配置不同的 Web Server.  測試的環境 OS : Ubuntu . 指令 lsb_release -a No LSB

python

Python in WordPressPython in WordPress

本頁是用來示範如何將 Python 執行的結果顯示在 WordPress 中. 以下的內容, 是由 Python Flask 回傳的簡單訊息. 並內嵌在 WordPress 的頁面中. 它的優點: WordPress 具有完整的 CMS 功能. 可以讓後端工程式簡化 UI 程式的開發. 而且界面容易變化管理 WordPress 有會員管理功能, 可以透過它來管理使用者 Python 適合用於後端資料處理. 開發速度快. 兩者結合方便很多.