Django deployment Failed in build stage.
Django deployment field in build stage. The build longs are not having any info i can use. I had deployed another app testing the platform and it worked well but this time round its not working
40 Replies
Project ID:
N/A
002662c
I assume your django app is inside of
/welearn
?
also this isn't a project idyes
in the service settings, set that folder as your root directory
thanks it deployed successfully but when I try to access the site am getting Internal Server Error.
what status code, and are there any errors in the logs?
no status code. just Internal Server Error. I am using Postgres and have not connected it here. can that be the problem. Also, the env variables in the file is not uploaded in GitHub. In build logs no any errors i can sport.
every http request has a status code
and yes if django was not able to connect to the database stuff wont work
here is a railway provided django template for you to reference
https://github.com/railwayapp-templates/django
^
^
I used the same template. Everything is as in the setting.py file. How do I set the variables here and the Postgres database
awsome
setup the variable references in your service
https://docs.railway.app/develop/variables#reference-variables
done move all the variables from my .env file using the raw editor and saved. redeploying now. How can I connect the Postgres database here.
show me a screenshot of your service variables please
now am getting this error. Server Error (500)
^
bruh
why would you show me the values
delete all your current PG*** variables
do you have a postgre database added to your project?
yes i have it
^
in my backed, i have connected Postgre but i have not connected it with railway Postgre server
please just do as i say, im only trying to help and you are making things difficult
the variables i have already deleted. just explaining the stage i am currectly
show me a screenshot of your entire browser window, open to the railway project please
where is your database?
your database should be in the same project of the service that needs access to it, delete that database, and add a new database into the project that has your django service, of course if you need the data from that database you will need to use pg_dump and pg_restore
let me know when you have done this so we can move on to the next step
awsome
now setup the variable references in your service
https://docs.railway.app/develop/variables#reference-variables
and show me a screenshot of that once done
show me your DATABASES section of your settings.py file please
(screenshot)
okay that looks good
are you still having errors?
yes. Internal Server Error
what's your start command
and do you have a repo for your code I could look at? maybe I will be able to see something obviously wrong
I have not set any
I can make the repo public and share link with you
yes please do
you are right something is not working as it should. When I set DEBUG = True it works just fine. But when it's False for deployment I get Internal Server Error
?