Closed cbrgm closed 6 years ago
Hi @cbrgm I just tested the master branch and I was able to push to IBM Cloud as a Cloud Foundry application without any problems.
https://github.com/IBM-Bluemix/get-started-python
cd get-started-python
bx cf push rvennam-python-th
Hi there!
First of all, thank you for taking the trouble to provide this example! Unfortunately, I had some difficulties with the deployment. After following the steps in the tutorial, it was not possible to deploy the app in Cloud Foundry. Everything works great locally, but once the project is pushed into the cloud, Cloud Foundry ignores any host and port parameters.
After a long search I found the solution and was able to deploy the app successfully. In the procfile the start parameter had to be adjusted and Python flask had to be informed via -h and -p flag about the corresponding settings of the host and port. Also, an environment variable had to be set in the Cloud Foundry app (FLASK_APP), without which Flask could not find and start the webservice.
I have adapted the procfile and README.md of the example here so that it can be executed correctly locally and remotely.