deploying mezzanine 3.0 on heroku - django

does anyone have the proper guide to deploy mezzanine on heroku? I couldn't get gunicorn to work.
My procfile is
web: python manage.py collectstatic --noinput; python manage.py run_gunicorn -b 0.0.0.0:$PORT
I saw there's fabfile.py which assist with gunicorn deployment. Could i utilize it for heroku? And how?

Related

django Procfile for heroku deployment using gunicorn

According to this documentation, the Procfile format is
<process type>: <command>
For example:
web: gunicorn djforms.wsgi --log-file -
However, I found a Django project where the Procfile was missing : after web. i.e.
web gunicorn djforms.wsgi --log-file -
It also worked correctly when I tried to deploy to heroku. Any Idea on why it works or issues it may cause? Any help will be appreciated!

run telegram bot inside a docker container with django app

I have a Django application and using python manage.py name_bot_job, I start the bot, but when I add this task to the docker-compose.yml file and make build, my bot just refuses to start, how can I do it with best practices?
entrypoint: ["/bin/sh","-c"]
command:
- |
python manage.py collectstatic --no-input --clear
python manage.py migrate --noinput
python manage.py createsuperuserwithpassword --username $${DJANGO_SUPERUSER_USERNAME} --password $${DJANGO_SUPERUSER_PASSWORD} --email $${DJANGO_SUPERUSER_EMAIL} --preserve
gunicorn job_filter_app.wsgi:application --bind 0.0.0.0:8000
python manage.py poolbot

Successfully Deployed to Heroku however page is not showing anything

Hi I have successfully deployed the python django app to heroku with no errors. However when i go to the link it just does not show anything.
heroku logs show me there's some H14 error.
Procfile.txt had been added with web: python manage.py runserver 0.0.0.0:6000
Why is the page still not showing up and it shows that no dynos are active.
URL: https://guarded-castle-63814.herokuapp.com/
The runserver is used for develop, on production use gunicorn.
Procfile
web: gunicorn config.wsgi

How to deploy Django with Channels and Celery on Heroku?

How one deploys the following stack on Heroku platform ?
Django
Django Channels
Celery
The limitation surely is on the Procfile.
To deploy Django with Celery it would be something like:
web: gunicorn project.wsgi:application
worker: celery worker --app=project.taskapp --loglevel=info
While deploying Django with Channels:
web: daphne project.asgi:channel_layer --port $PORT --bind 0.0.0.0 -v2
worker: python manage.py runworker -v2
The web process can use ASGI, but the worker process will be used by Channels and I don't see how Celery can be started alongside it.
You can have as many entries in the Procfile as you like. The only one that is special is "web", because that's the one Heroku expects to receive web requests, and the only one it will start automatically for you. You can use your own names for the rest:
web: gunicorn project.wsgi:application
celeryworker: celery worker --app=project.taskapp --loglevel=info
channelsworker: python manage.py runworker -v2
Now you can do heroku ps:scale celeryworker=1 and heroku ps:scale channelsworker=1 to start the other two processes.
See the Heroku Procfile docs for more information.

Unknown command: 'run_gunicorn' with Django, Heroku, and New Relic

I am installing an add-on named New Relic (monitoring) on my Django Heroku app, following this doc.
After installaling the new relic agent, I was asked to change the Procfile to:
web: newrelic-admin run-program python manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3
I dit it.
When starting the app on Heroku, I can see in heroku logs that it's crashed because of a Unknown command: 'run_gunicorn' error.
Indeed, typing heroku run python manage.py help let me see that the command does not exist.
What's going on?
here is an extract of heroku run pip freeze:
Django==1.7.6
gunicorn==19.1.1
newrelic==2.46.0.37