首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将django应用程序推送到IBM Bluemix

将django应用程序推送到IBM Bluemix
EN

Stack Overflow用户
提问于 2017-10-19 16:33:38
回答 2查看 389关注 0票数 0

我目前正在尝试将我的本地Django应用程序推送到IBM Bluemix服务器。我使用Cloud-foundry和cf命令来做这件事。

下面是我在使用以下命令时得到的错误: cf push my-app

代码语言:javascript
复制
     $ python manage.py collectstatic --noinput
       test os1913
       55 static files copied to '/tmp/app/backoffice2/static'.
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (155M)
Uploaded droplet (223.8M)
Uploading complete
Destroying container
Successfully destroyed container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful

我尝试使用cf日志来查看我的推送出了什么问题,但徒劳无功。您可以在下面看到cf日志的结果。

代码语言:javascript
复制
   2017-10-19T08:14:07.05+0000 [STG/0] OUT      $ python manage.py collectstatic --noinput
   2017-10-19T08:14:07.46+0000 [STG/0] OUT        test os1913
   2017-10-19T08:14:08.57+0000 [STG/0] OUT        55 static files copied to '/tmp/app/backoffice2/static'.
   2017-10-19T08:16:37.61+0000 [STG/0] OUT Exit status 0
   2017-10-19T08:16:37.61+0000 [STG/0] OUT Staging complete
   2017-10-19T08:16:37.61+0000 [STG/0] OUT Uploading droplet, build artifacts cache...
   2017-10-19T08:16:37.61+0000 [STG/0] OUT Uploading build artifacts cache...
   2017-10-19T08:16:37.61+0000 [STG/0] OUT Uploading droplet...
   2017-10-19T08:16:45.42+0000 [STG/0] OUT Uploaded build artifacts cache (155M)
   2017-10-19T08:16:54.71+0000 [STG/0] OUT Uploaded droplet (223.8M)
   2017-10-19T08:16:54.75+0000 [STG/0] OUT Uploading complete
   2017-10-19T08:16:54.86+0000 [STG/0] OUT Destroying container
   2017-10-19T08:16:57.68+0000 [STG/0] OUT Successfully destroyed container
   2017-10-19T08:17:05.38+0000 [CELL/0] OUT Creating container
   2017-10-19T08:17:06.47+0000 [CELL/0] OUT Successfully created container
   2017-10-19T08:17:23.66+0000 [CELL/0] OUT Starting health monitoring of container
   2017-10-19T08:17:25.93+0000 [APP/PROC/WEB/0] ERR bash: normal-start-command: No such file or directory
   2017-10-19T08:17:25.93+0000 [APP/PROC/WEB/0] OUT Exit status 1
   2017-10-19T08:17:25.97+0000 [CELL/0] OUT Exit status 0
   2017-10-19T08:17:26.00+0000 [CELL/0] OUT Destroying container
   2017-10-19T08:17:26.02+0000 [API/0] OUT Process has crashed with type: "web"
   2017-10-19T08:17:26.03+0000 [API/0] OUT App instance exited with guid d470d027-d5c6-48e5-9883-c4e950e4c7b8 payload: {"instance"=>"93c5bc85-71b6-475b-486d-66e7", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>1, "crash_timestamp"=>1508401045980916586, "version"=>"81113fa3-598a-495c-97a8-2032968858cd"}
   2017-10-19T08:17:27.99+0000 [CELL/0] OUT Successfully destroyed container
   2017-10-19T08:17:35.12+0000 [CELL/0] OUT Creating container
   2017-10-19T08:17:36.51+0000 [CELL/0] OUT Successfully created container
   2017-10-19T08:17:56.99+0000 [CELL/0] OUT Starting health monitoring of container
   2017-10-19T08:17:59.60+0000 [APP/PROC/WEB/0] ERR bash: normal-start-command: No such file or directory
   2017-10-19T08:17:59.66+0000 [APP/PROC/WEB/0] OUT Exit status 1
   2017-10-19T08:17:59.75+0000 [CELL/0] OUT Exit status 0
   2017-10-19T08:17:59.78+0000 [CELL/0] OUT Destroying container
   2017-10-19T08:17:59.80+0000 [API/1] OUT Process has crashed with type: "web"
   2017-10-19T08:17:59.81+0000 [API/1] OUT App instance exited with guid d470d027-d5c6-48e5-9883-c4e950e4c7b8 payload: {"instance"=>"2c057e8c-0955-43e5-6e97-b61f", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>2, "crash_timestamp"=>1508401079759915860, "version"=>"81113fa3-598a-495c-97a8-2032968858cd"}
   2017-10-19T08:18:01.75+0000 [CELL/0] OUT Creating container
   2017-10-19T08:18:02.39+0000 [CELL/0] OUT Successfully destroyed container
   2017-10-19T08:18:03.69+0000 [CELL/0] OUT Successfully created container
   2017-10-19T08:18:29.97+0000 [CELL/0] OUT Starting health monitoring of container
   2017-10-19T08:18:32.30+0000 [APP/PROC/WEB/0] ERR bash: normal-start-command: No such file or directory
   2017-10-19T08:18:32.31+0000 [APP/PROC/WEB/0] OUT Exit status 1
   2017-10-19T08:18:32.49+0000 [CELL/0] OUT Exit status 0
   2017-10-19T08:18:32.50+0000 [CELL/0] OUT Destroying container
   2017-10-19T08:18:32.52+0000 [API/2] OUT Process has crashed with type: "web"
   2017-10-19T08:18:32.53+0000 [API/2] OUT App instance exited with guid d470d027-d5c6-48e5-9883-c4e950e4c7b8 payload: {"instance"=>"cb2d7d3c-6c89-4f4a-762f-054f", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>3, "crash_timestamp"=>1508401112496966489, "version"=>"81113fa3-598a-495c-97a8-2032968858cd"}
   2017-10-19T08:18:34.87+0000 [CELL/0] OUT Successfully destroyed container

非常提前感谢您:)

EN

回答 2

Stack Overflow用户

发布于 2017-10-22 21:21:28

这里有3个关键文件,你需要把它们弄对。第一个是manifest.yml,它设置了云计算构建包,第二个是requirements.txt,它定义了你的应用依赖项,第三个是runtime.txt,它声明了python的版本。

其中一个是不正确的。

票数 0
EN

Stack Overflow用户

发布于 2017-10-26 04:11:58

这是一篇展示Python + Django + Bluemix组合的文章-- https://www.ibm.com/developerworks/cloud/library/cl-worldbank-charting-app/index.html

您需要拥有正确的manifest.yml。

一定要通读这篇文章,希望它能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46825734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档