Thursday, September 15, 2022

Re: help on how to deploy django app on railway "

Hi I don't know much about deploying, I'm still a newbie 

There is an option to deploy a template, use it to deploy a Django template

So normally I'd deploy a Django template which railway also create a repository(if you linked your Github), Postgresql database for that template and so clone the repo to your machine and start working on the repo.

Make sure you install railway CLI on your computer 

so you will need to login on CLI using 

"railway login --browserless'

Link your production environment 

"railway link" and select the environment

use "railway run ...." to run django commands 

Like 
railway run python manage.py runserver 

On Thu, 15 Sep 2022, 22:32 ola neat, <tosinayoola0@gmail.com> wrote:
hallo guys,
so i'm having issue deploying my django on railway but once the deployment is complete the app crash with this err


raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.


and below is my django settings and railway setting

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'HOST': os.environ.get('PGHOST'),
        'NAME': os.environ.get('PGDATABASE'),  
        'USERNAME': os.environ.get('PGUSER'),
        'PASSWORD': os.environ.get('PGPASSWORD'),
        'PORT':os.environ.get('PGPORT')
    }
}



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn72hHAj7Dfhf%2BPiYsd1Lkv0XRsMcJC%3DRbHBbWq7ackmuTw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANfc-pB2hfy3CxXcAsMLdK2Eu94tEc-ANVng7jG61a%3DfAFnR-g%40mail.gmail.com.

No comments:

Post a Comment