Search code examples
python-3.xdjangoherokuheroku-cli

Problems getting while hosting django app on heroku


Hey there i have just hosted my Django app on Heroku and i faced theses two problem :

  1. "Failed to detect app matching no buildpack"
  2. Procfile declares types -> (none)

and when i run heroku logs --tail i get this

2013-08-31T21:00:25.085053+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=


Solution

  • 1. For this Failed to detect app matching no buildpack:

    find the platform you are working on and make a buildpack accordingly

    • Java: pom.xml

    • Ruby: Gemfile

    • Node.js:package.json

    • Python: requirements.txt / setup.py / Pipfile

    • PHP: composer.json / index.p

    Eg if you are working on Django or flask make a buildpack in your root folder named as requirements.txt

    2. Procfile declares types -> (none) Do the following to resolve it

    1. first delete your Procfile but copy the inside content in your clipboard
    2. Then type the following command in your root dir.. folder
    3. git init
    4. git add .
    5. git commit -m "procfile-commit"
    6. git push heroku master
    7. create a new Procfile and paste the content from your clipboard
    8. Then again type these following command
    9. git init
    10. git add .
    11. git commit -m "procfile-commit"
    12. git push heroku master