R
Railway•17mo ago
mauricio_sba

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