help on how to deploy django app on railway "

525 views
Skip to first unread message

ola neat

unread,
Sep 15, 2022, 4:32:50 PM9/15/22
to django...@googlegroups.com
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')
    }
}


image.png
Screenshot from 2022-09-15 21-22-39.png

Mohammad Anarul

unread,
Sep 15, 2022, 4:56:27 PM9/15/22
to django...@googlegroups.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn72hHAj7Dfhf%2BPiYsd1Lkv0XRsMcJC%3DRbHBbWq7ackmuTw%40mail.gmail.com.

Percy Masekwameng

unread,
Sep 15, 2022, 5:04:36 PM9/15/22
to django...@googlegroups.com
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 

--

ola neat

unread,
Sep 15, 2022, 5:05:55 PM9/15/22
to django...@googlegroups.com
that wat i did before and it still giving me same error, i had to comment it out 

DATABASES = {
"default": dj_database_url.config(default=DATABASE_URL, conn_max_age=1800),
}


ola neat

unread,
Sep 15, 2022, 5:09:08 PM9/15/22
to django...@googlegroups.com
they app is almost complete, i'm only migrating from heroku to railway, it not new app 

subin

unread,
Sep 16, 2022, 1:24:14 PM9/16/22
to django...@googlegroups.com
Hi ! Thanks for making an appointment with us. We’re located at . We look forward to seeing you then!

subin

unread,
Sep 16, 2022, 1:25:03 PM9/16/22
to django...@googlegroups.com
Hello! I am out of the office now but will get back to you ASAP. You can expect a reply by  at the latest. You can contact  at  for anything you need.

On Thu, Sep 15, 2022 at 10:04 PM Percy Masekwameng <percymase...@gmail.com> wrote:

subin

unread,
Sep 16, 2022, 1:25:47 PM9/16/22
to django...@googlegroups.com
Thanks for reaching out to XYZ Company! Our business hours are M-F

subin

unread,
Sep 16, 2022, 1:26:39 PM9/16/22
to django...@googlegroups.com
We have received your message and will be in touch within

--
Reply all
Reply to author
Forward
0 new messages