创建资源 安装使用 IBM Cloud CLI https://console.bluemix.net/docs/cli/index.html#overview ibmcloud api https://api.ng.bluemix.net ibmcloud login -u [email protected] -o [email protected] -s dev //上传 bluemix app push pythondjangotest 创建项目 django-admin startproject mysite cd mysite //上传程序要在这个目录执行上传命令 python3 manage.py startapp helloworld 解决依赖 pip3 freeze > requirements.txt chardet==2.3.0 Django==2.1.7 gunicorn==19.9.0 httplib2==0.9.2 pycurl==7.43.0 pytz==2018.9 reportbug==7.1.7 requests==2.12.4 six==1.10.0 urllib3==1.19.1 uWSGI==2.0.18 在目录下新建runtime.txt,并添加python版本 例如: python-3.6.4 遇到错误 bluemix cf set-env pythondjangotest DISABLE_COLLECTSTATIC 1 bluemix cf restage pythondjangotest Procfile文件 web: gunicorn mysite.wsgi bluemix app push pythondjangotest 各种问题 python3……

阅读全文