Hello! Not sure what's going on with Railway or Strapi
Hello! I have an issue with the domain generated by Railway (I think). I'm not using Railway's Strapi service; instead, I uploaded it through a GitHub repository. Everything is set up correctly; I configured the Railway database to integrate with the repository.
But I'm facing an issue with the domain provided by Railway. Every time it's finishing the upload, the following error occurs:
This is my first time using Railway and seeking help here. If you need any additional information, please let me know. Thank you for your time.
![No description](https://cdn.answeroverflow.com/1184936183558582343/Captura_de_pantalla_2023-12-14_151303.png)
39 Replies
Project ID:
N/A
looks like maybe you are trying to set the database url as your railway domain?
can you show me a screenshot of your railway project?
Clear! Specifically what you want me to show you.
What about the services?
nothing specific, I'd just like a screenshot of the project
Something like that?
![No description](https://cdn.answeroverflow.com/1184938439473385603/image.png)
perfect
can I see your database.js file?
Sure
![No description](https://cdn.answeroverflow.com/1184938940877246474/image.png)
Do you think it's because I'm not using Strapi's env()?
I don't
can you show me your service variables on the strapi service?
I'd like a screenshot of what the raw editor shows, of course block off anything that may be sensitive
So?
![No description](https://cdn.answeroverflow.com/1184941364002172999/image.png)
^
could you please use reference variables for all database related variables?
https://docs.railway.app/guides/variables#reference-variables
Yes I think so. Shared right?
reference the postgres service, please read the link.. Referencing another service's variable
Thanks for the information, I'm already doing it.
Ready, the variables are linked to the database.
it looks something like this.
PGHOST=${{Postgres.PGHOST}}
PGPORT=${{Postgres.PGPORT}}
PGDATABASE=${{Postgres.PGDATABASE}}
PGUSER=${{Postgres.PGUSER}}
PGPASSWORD=${{Postgres.PGPASSWORD}}
POSTGRES_DB=${{Postgres.POSTGRES_DB}}