sb32134
sb32134

Reputation: 430

how to run flask based server locally before deploying to openshift

My project is flask based server running on openshift. But before deploying, i would like to run it locally, is there way to run openshift app to run locally? May be somewhere documented? This is because most of the time, error is related to openshift path.

Idea is to first test the application before deploying.

Here is my project structure :

├── requirements.txt
├── setup.py
├── wsgi
│   ├── application
│   ├── app.py
│   ├── app.pyc
│   ├── auth.py
│   ├── evaluation.cfg
│   ├── forms.py
│   ├── main.py
│   ├── manage.py
│   ├── models.py
│   ├── readme.md
│   ├── result.json
│   ├── templates
│   │   ├── base.html
│   │   ├── evaluate.html
│   │   └── show_all.html
│   └── views.py
└── wsgi.py

The error when running the app locally is :

KeyError: 'OPENSHIFT_PYTHON_DIR'

Upvotes: 0

Views: 288

Answers (1)

user2879327
user2879327

Reputation:

The only way to run this on OpenShift locally would be to install your own instance of OpenShift Origin locally (http://openshift.github.io/). Otherwise you just have to do a git push and then look in your log files if you have issues.

Upvotes: 1

Related Questions