2014-03-29 119 views
2

我想使用本教程我的应用程序部署到Heroku的后:没有资源发现错误部署Django应用程序

https://devcenter.heroku.com/articles/getting-started-with-django#deploy-to-heroku

我设法我的应用程序推送到Heroku的,但我不断收到此错误时我试图以确保我至少有一个测功机运行:

(tapeworm_django)Christophers-MacBook-Pro-2:tapeworm christopherspears$ heroku ps:scale web=1 
Scaling dynos... failed 
! No app specified. 
! Run this command from an app folder or specify which app to use with --app APP. 

(tapeworm_django)Christophers-MacBook-Pro-2:tapeworm christopherspears$ heroku ps:scale web=1 --app tapeworm 
Scaling dynos... failed 
! Resource not found 

我跑相同的目录中我Procfile里面的命令:

/Users/christopherspears/PyDevel/tapeworm_django 
(tapeworm_django)Christophers-MacBook-Pro-2:tapeworm_django christopherspears$ ls * 
README.md   requirements.txt 

tapeworm: 
Procfile drawings/ manage.py* tapeworm/ templates/ 

任何提示?

UPDATE:

我能得到它在本地运行:

(tapeworm_django)Christophers-MacBook-Pro-2:tapeworm christopherspears$ foreman start 
16:43:17 web.1 | started with pid 2366 
16:43:17 web.1 | 2014-03-29 16:43:17 [2366] [INFO] Starting gunicorn 18.0 
16:43:17 web.1 | 2014-03-29 16:43:17 [2366] [INFO] Listening at: http://0.0.0.0:5000 (2366) 
16:43:17 web.1 | 2014-03-29 16:43:17 [2366] [INFO] Using worker: sync 
16:43:17 web.1 | 2014-03-29 16:43:17 [2369] [INFO] Booting worker with pid: 2369 
+0

你确定该应用程序是g etting推送正确吗? 'git remote -v'指向正确的回购? –

+0

似乎指向正确的回购:'heroku [email protected]:tapeworm.git(fetch) heroku \t [email protected]:tapeworm.git(推送) 原产地\t https://github.com/ cspears2002/tapeworm.git(fetch) 原点\t https://github.com/cspears2002/tapeworm.git(push)' –

回答

0

我设法得到这个工作。首先,我把我的Procfile升了一级,所以我的项目的结构,像这样:

tapeworm_django/ 
    Procfile 
    README.md 
    requirements.txt 
    tapeworm/ 
    drawings/ <- app 
    manage.py 
    tapeworm/ <- project configuration folder 
    templates/ 

我感动Procfile升了一级,因为我看到,大部分开发商似乎放在根目录下的文件。我错了吗?

然后,我改变了文件的内容从

web: gunicorn tapeworm.wsgi 

web: python tapeworm/manage.py runserver 0.0.0.0:$PORT --noreload 

我不确定是否该解决方案被认为是“正确的”,因为它似乎与入门发生冲突Django教程:

https://devcenter.heroku.com/articles/getting-started-with-django

相关问题