#Multiple Problems

57 messages · Page 1 of 1 (latest)

balmy spindle
#

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.

hidden boneBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

tidal flickerBOT
#

Project ID: b0a53e83-4710-4860-82f3-bcaca8b6fc07

tacit bone
#

please share a link to your repo

balmy spindle
tacit bone
#

you are using sqlite

#

you need to be using postgres

#

it uses postgres

#

please show me a screenshot of your railway service variables

#

full browser window screenshot though

balmy spindle
#

I try with PostgreSQL, but I down and up the Repo with the code again and again.

tacit bone
#

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

balmy spindle
#

Actualice the repo with the psql setting and do that, now i go to tho the terminal to try

tacit bone
#

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

balmy spindle
#

Sorry, this is the varaible screen

tacit bone
#

that looks good, now please provide the full build logs

balmy spindle
tacit bone
#

no, build logs

tacit bone
balmy spindle
#

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:

tacit bone
#

neither of those commands have anything to do with logs

tacit bone
balmy spindle
tacit bone
#

in your requirements.txt file, use psycopg2-binary instead of psycopg2

balmy spindle
#

with the '==2.9.6' or not?
I don't want to mess something simple

tacit bone
#

yes use ==2.9.6

balmy spindle
#

The page is succes up, but doesn't charge the static files 😦
I can change things in code whitout fear? jaja

tacit bone
#

maybe

balmy spindle
#

Well, i'll try, thanks bro.

#

I apreciatte your time

balmy spindle
#

Can you give me follow to this deploy?, same DB, almost same code, but differnet repo, i build the app from zero

tacit bone
#

what's seems to be the issue

balmy spindle
#

Build, but crashes

tacit bone
balmy spindle
tacit bone
balmy spindle
#

ok, i see the '_psycopg2' fragment
I need too the railway.json?

tacit bone
#

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

balmy spindle
#

i doesn't hace the procfile

#

have*

tacit bone
#

what does your project have then

balmy spindle
#

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?

tacit bone
#

sure

balmy spindle
tacit bone
balmy spindle
#

There are a method to copy and paste all?
always copy only a block and no all

#

ok

tacit bone
balmy spindle
#

This is better?

tacit bone
#

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! 🙂