You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will try to commit soon these changes as I finally could deploy with success using Daphne server using ASGI protocol.
And it is not supposed to use the .env file in Heroku like I saw in some issues. This file is not supposed to be used in production but only in dev. So if you want to use in Heroku the variables defined by OS, you should uncomment this in Config>Settings>base.py:
READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: # OS environment variables take precedence over variables from .env env.read_env(str(ROOT_DIR.path('.env')))
Initially this was a question but since I could solve here's some help.
The text was updated successfully, but these errors were encountered:
gusbakker
changed the title
Deploy to production using Heroku error
Problems when deploying to production using Heroku
Apr 22, 2020
For anyone here that could not successfully deployed to production using Heroku:
I found this issue in Procfile:
web: daphne -b 0.0.0.0 -p 8001 config.asgi:application
which has to be changed to this:
web: daphne config.asgi:application --port $PORT --bind 0.0.0.0 -v2
I will try to commit soon these changes as I finally could deploy with success using Daphne server using ASGI protocol.
And it is not supposed to use the
.env
file in Heroku like I saw in some issues. This file is not supposed to be used in production but only in dev. So if you want to use in Heroku the variables defined by OS, you should uncomment this in Config>Settings>base.py:READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: # OS environment variables take precedence over variables from .env env.read_env(str(ROOT_DIR.path('.env')))
Initially this was a question but since I could solve here's some help.
The text was updated successfully, but these errors were encountered: