https://github.com/twtrubiks/deploying-flask-to-openshift
Deploying a Flask App To OpenShift Tutorial 📝
https://github.com/twtrubiks/deploying-flask-to-openshift
deploy flask openshift python ssh-key tutorial
Last synced: about 1 year ago
JSON representation
Deploying a Flask App To OpenShift Tutorial 📝
- Host: GitHub
- URL: https://github.com/twtrubiks/deploying-flask-to-openshift
- Owner: twtrubiks
- Created: 2017-02-02T12:38:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T13:15:53.000Z (over 9 years ago)
- Last Synced: 2025-04-15T12:12:29.516Z (about 1 year ago)
- Topics: deploy, flask, openshift, python, ssh-key, tutorial
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deploying-Flask-To-OpenShift
Deploying a Flask App To OpenShift Tutorial 📝
* [Youtube Demo](https://youtu.be/PlomZkYcdYU)
今天教大家如何佈署 Flask App 到 [OpenShift](https://www.openshift.com/)
[OpenShift](https://www.openshift.com/) 免費版本
* 可以創造 3個 app。
更多說明請參考 [OpenShift](https://www.openshift.com/)
## 教學
### 步驟一
先註冊 OpenShift 帳號,請到 [OpenShift](https://www.openshift.com/) 註冊
### 步驟二
新增 SSH keys
可參考 github 的 [generating-a-new-ssh-key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/) 說明
或是
參考小弟之前拍的影片 [github基本教學 - 從無到有](https://www.youtube.com/watch?v=py3n6gF5Y00)
影片教學包含如何產生 SSH key
如下圖將自己的 id_rsa.pub 設定完畢即可

### 步驟三
開始建立 flask web app

[OpenShift](https://www.openshift.com/) 支援非常多的程式語言,
找到 python ,然後點選 see all 就可以找到 Flask 了


接著輸入網址的名稱,如果輸入的不合法,他會提醒你

接著按 Create Application ,然後就是等~~~~~

等他跑完,就會跳到下面這個畫面

基本上就是 git 的操作,如不清楚什麼是 [Git](https://git-scm.com/)
可以參考我之前寫的 [Git-Tutorials](https://github.com/twtrubiks/Git-Tutorials)

clone 下來預設的資料夾底下會有這些東西

可以直接點紅色框起來的地方

以下範例是我的
[http://deployingflasktutorials-twtrubikscode.rhcloud.com/](http://deployingflasktutorials-twtrubikscode.rhcloud.com/)
會直接跳到你的網站,預設 Flask app 版面如下

如果你需要重新佈署,基本上就是 git 的操作

我修改掉標題的部分

以上就是 Deploying-Flask-To-OpenShift 的方法,更多資訊可以參考
[Getting Started with the Flask Microframework](https://developers.openshift.com/languages/python/flask.html)
## Reference
* [OpenShift](https://www.openshift.com/)
## License
MIT license