Closed phr85 closed 3 years ago
Hello Philippe
I just fixed a bug that I found in Gutendex's updatecatalog
script. Could you pull the latest code, try again, and let me know if it works now?
Hello @garethbjohnson Thank you for fix. Catalog is generating well.
But somehow my run config script is somehow not working:
Procfile:
release: pip install gunicorn && python manage.py migrate && python manage.py updatecatalog && python manage.py collectstatic web: gunicorn gutendex.wsgi
In your release command, it looks like the collectstatic
part fails because, by default, it requires the user to type "yes" to confirm. To fix this, you can skip the user input requirement by adding --no-input
to the collectstatic
part of the command like this: python manage.py collectstatic --no-input
I think your web
command is failing somewhere because it tries to run manage.py runserver
instead of python manage.py runserver
or ./manage.py runserver
. However, I don't see that in your Procfile
, so I don't know where that faulty command comes from. Maybe you just need to put the web:
command on its own line? I was able to get Gutendex running on Heroku with this Procfile
:
release: pip install gunicorn && pip install django-heroku && python manage.py migrate && python manage.py updatecatalog && python manage.py collectstatic --no-input
web: gunicorn gutendex.wsgi
@garethbjohnson Thank you very much for helping me!
I tried but somehow it still not working:
Which python version do you use in your "runtime.txt"? I use "python-3.6.15".
I'm not sure what MEDIA_ROOT and STATIC_ROOT has to be on Heroku. "/app/static/"?
I did not add a "runtime.txt", but it seems to use Python 3.9.7. (I also had to update the version of psycopg2
to 2.9.1
in "requirements.txt", but I don't know if that's related to the Python version.)
For STATIC_ROOT, I used "/var/www/gutendex/static", but I think the django_heroku
package overrides this anyway, and a blank value seems to work for me, too. If updating the Python and psycopg2
versions doesn't work, try making sure in "gutendex/settings.py" you are importing django_heroku
at the top and have this at the bottom: django_heroku.settings(locals())
Hello @garethbjohnson Thank you for your help. I did exactly what you advice me. It run through processes but in end somehow server not really run (crashing). Any idea what else I could try?
Ah, I think you now just need to add the line gunicorn==20.1.0
to your "requirements.txt". (Also make sure you have django-heroku==0.3.1
.)
@garethbjohnson YES! Thank you very much, now is working!
Hello
I try to deploy gutendex on heroku.com. But I don't know exactly how to do it. What I did so far:
Create "Procfile" file:
release: pip install gunicorn && python manage.py migrate && python manage.py updatecatalog && python manage.py collectstatic web: gunicorn gutendex.wsgi
Catalog (DB) is now generated. But somehow Server always crash on start up:
Maybe someone can help me?