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
Percy
Percy•2y ago
Project ID: b0a53e83-4710-4860-82f3-bcaca8b6fc07
Brody
Brody•2y ago
please share a link to your repo
mauricio_sba
mauricio_sbaOP•2y ago
GitHub
GitHub - Mauricio-Saavedra/web-practica-r
Contribute to Mauricio-Saavedra/web-practica-r development by creating an account on GitHub.
Brody
Brody•2y ago
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
mauricio_sba
mauricio_sbaOP•2y ago
I try with PostgreSQL, but I down and up the Repo with the code again and again.
Brody
Brody•2y ago
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 variables
mauricio_sba
mauricio_sbaOP•2y ago
Actualice the repo with the psql setting and do that, now i go to tho the terminal to try
Brody
Brody•2y ago
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
mauricio_sba
mauricio_sbaOP•2y ago
Sorry, this is the varaible screen
Brody
Brody•2y ago
that looks good, now please provide the full build logs
mauricio_sba
mauricio_sbaOP•2y ago
This?
Brody
Brody•2y ago
no, build logs these are the build logs, please provide me with the entire build logs in a .txt file
mauricio_sba
mauricio_sbaOP•2y ago
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:
Brody
Brody•2y ago
neither of those commands have anything to do with logs you are overthinking this, just copy and paste all the build logs
mauricio_sba
mauricio_sbaOP•2y ago
Yeah, i'm nervous :c
Brody
Brody•2y ago
in your requirements.txt file, use psycopg2-binary instead of psycopg2
mauricio_sba
mauricio_sbaOP•2y ago
with the '==2.9.6' or not? I don't want to mess something simple
Brody
Brody•2y ago
yes use ==2.9.6
mauricio_sba
mauricio_sbaOP•2y ago
The page is succes up, but doesn't charge the static files 😦 I can change things in code whitout fear? jaja
Brody
Brody•2y ago
maybe
mauricio_sba
mauricio_sbaOP•2y ago
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
Brody
Brody•2y ago
what's seems to be the issue
mauricio_sba
mauricio_sbaOP•2y ago
Build, but crashes
Brody
Brody•2y ago
you are using sqlite you need to be using postgres you can reference the railway template here https://github.com/railwayapp-starters/django
mauricio_sba
mauricio_sbaOP•2y ago
But in my settings.py it's ok, no? :0
Brody
Brody•2y ago
not really you can reference the railway template here https://github.com/railwayapp-starters/django
mauricio_sba
mauricio_sbaOP•2y ago
ok, i see the '_psycopg2' fragment I need too the railway.json?
Brody
Brody•2y ago
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
mauricio_sba
mauricio_sbaOP•2y ago
i doesn't hace the procfile have*
Brody
Brody•2y ago
what does your project have then
mauricio_sba
mauricio_sbaOP•2y ago
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?
Brody
Brody•2y ago
sure
Brody
Brody•2y ago
show me this again
mauricio_sba
mauricio_sbaOP•2y ago
There are a method to copy and paste all? always copy only a block and no all ok
mauricio_sba
mauricio_sbaOP•2y ago
Brody
Brody•2y ago
mauricio_sba
mauricio_sbaOP•2y ago
This is better?
Brody
Brody•2y ago
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! 🙂
mauricio_sba
mauricio_sbaOP•2y ago
Thanks man, sorry for triggered you, i'm new in all of this
Want results from more Discord servers?
Add your server