Multiple Problems
Service ID: b0a53e83-4710-4860-82f3-bcaca8b6fc07
Main details:
Framework: Django.
Database: PostgreSQL.
I have encountered several issues in the process of learning to deploy my app:
- Error generating the Docker image.
- The page works locally but stops serving after using [pip manage.py collectstatic].
- I'm not sure if I am declaring the local variables correctly in my code because I see that RailWay uses {{Var}} keys, and I declare mine with the help of a .env file.
Honestly, I feel very lost, increasingly so.
- django.db.utils.OperationalError: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory. Is the server running locally and accepting connections on that socket?
- Only once did it stay deployed without crashing or failing, but it was not possible to visualize anything in the browser.
I hope you can assist me. Thank you in advance.
42 Replies
Project ID:
b0a53e83-4710-4860-82f3-bcaca8b6fc07
please share a link to your repo
GitHub
GitHub - Mauricio-Saavedra/web-practica-r
Contribute to Mauricio-Saavedra/web-practica-r development by creating an account on GitHub.
https://github.com/Mauricio-Saavedra/web-practica-r/blob/master/Rousse_web/settings.py#L28
you are using sqlite
you need to be using postgres
you can reference the railway template here
https://github.com/railwayapp-starters/django
it uses postgres
please show me a screenshot of your railway service variables
full browser window screenshot though
I try with PostgreSQL, but I down and up the Repo with the code again and again.
you can test it locally with
railway run <the command you use to start your app normally>
this pulls the variables from your railway service and gives them to the command you want to run
please show me a full browser screenshot of your railway service variablesActualice the repo with the psql setting and do that, now i go to tho the terminal to try
this will be the 3rd time I have asked.
please show me a full browser screenshot of your railway service variables, keep the values hidden
Sorry, this is the varaible screen
that looks good, now please provide the full build logs
This?
no, build logs
these are the build logs, please provide me with the entire build logs in a .txt file
The railway shell thells me 'psql must be installed to continue', but i have psql in my pc.
Now, i write [ railway up > build_logs.txt ] and give me this:
neither of those commands have anything to do with logs
you are overthinking this, just copy and paste all the build logs
Yeah, i'm nervous :c
in your requirements.txt file, use
psycopg2-binary
instead of psycopg2
with the '==2.9.6' or not?
I don't want to mess something simple
yes use ==2.9.6
The page is succes up, but doesn't charge the static files 😦
I can change things in code whitout fear? jaja
maybe
Well, i'll try, thanks bro.
I apreciatte your time
Can you give me follow to this deploy?, same DB, almost same code, but differnet repo, i build the app from zero
what's seems to be the issue
Build, but crashes
you are using sqlite
you need to be using postgres
you can reference the railway template here
https://github.com/railwayapp-starters/django
But in my settings.py it's ok, no? :0
not really
you can reference the railway template here
https://github.com/railwayapp-starters/django
ok, i see the '_psycopg2' fragment
I need too the railway.json?
you can think of a railway.json file as something to replace a Procfile, but you are fine still using a Procfile, as long as you have the correct start command in your Procfile that is
i doesn't hace the procfile
have*
what does your project have then
in the root i have this:
-/contact/
-/core/
-/leonesa/
-/post/
-/venv/
-.env
-.gitignore
-manage.py
-README.md
-requirements.txt
Crashesh again, i send you the 'Deploy Log' complete?
sure
show me this again
There are a method to copy and paste all?
always copy only a block and no all
ok
you can reference the railway template here
https://github.com/railwayapp-templates/django/blob/main/mysite/settings.py#L81
This is better?
I don't think my attempts to guide you in the right direction are bearing any fruit. I wish you the best as you debug your issue. Hopefully it gets resolved! 🙂
Thanks man, sorry for triggered you, i'm new in all of this