2014-03-29 64 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

相關問題