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.

python

Python in WordPressPython in WordPress

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

爬蟲: 下載台股歷史股價 TWSE爬蟲: 下載台股歷史股價 TWSE

適用對象: 有 Python 基礎. 可以自己執行 Python 程式的人. 有興趣學習 Python 爬蟲程式的人. 知識基礎: Python Pandas : Python 數據分析的資料結構函式庫. 是爬蟲程式的主要核心. Requests : Python 網路連線功能. 作為 Http 資源下載使用. 爬蟲程式的概念: 其實爬蟲程式的概念很簡單. 找到你要的網路資源 (包含網頁, 檔案…) ,