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.

regexp

正則表達式與爬蟲正則表達式與爬蟲

不知道什麼是 Regexp 別說你懂爬蟲~~ 帶你了解 Regexp 正則的強大文字處理功能 什麼是 正則表達式 ( Regexp ) ? Regular Expression , 中文稱為正則表達式.  它的前世今生, 請看 WIKI  .   為什麼要在這裏說明什麼是 Regexp 呢? 即使是很多的程式設計師, 對於正則的使用, 也未必清楚. 在大數據時代來源之前, 正則的使用, 耳熟能詳的, 就只是在

使用 Python , Selenium 的適用場景使用 Python , Selenium 的適用場景

Selenium 是一個網站的測試工具. 使用的方法 可以透過 Selenium 建立測試碼. 可以透過 Python 自動化測試. 作法, 首先將 Selenium 的測試碼寫成 Python 物件. 再使用 Python 透過 iteration 的方式呼叫這個物件. 方法一, 這適合單筆單筆的進行測試. 尤其是公司內部進行網頁程式上線前的測試.方法二, 適合大量的網站連結測試, 或個別網站程式的測試. 適用場景: 公司企業網站的系統自動化測試. 它可以自動點擊或輸入欄位資料 建立自動化作業. 透過

python

Python in WordPressPython in WordPress

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