4 months ago
Currently I have my app running on railway with postgres, but the app is connected to db via hostname + port + etc instead of URL. And it's via external url. When I try change to internal my app crushes, same with when I'm trying to use a URL: I get an error
Error during migration run: TypeError: Invalid URL
I suspect there must be problem with that I launch migrations in dockerfile entrypoint (which calls npm run typeorm:run-migrations:prod && npm run start:prod
)
I tried to find some guides on how to correctly set it all up but couldn't find any, so I'm asking here for help.
Thank you in advance.
0 Replies
I tried to remove migrations. I continue to get this error when using internal db url
4 months ago
have you verified that the URL is valid to begin with?
I have environment variable. DB_URL
. Locally everything works fine. On the railway when I put there ${{Postgres.DATABASE_URL}}
everything works like a charm but with${{Postgres.DATABASE_PRIVATE_URL}}
I get the abovementioned error. Copying value directly and putting it in the field also gives error
4 months ago
so if you saved that reference value and then copied its value it would indeed be the correct url?
I don't understand your question, sorry. Do you ask if I checked spelling? I copy pasted it directly from and tried alternatively copy pasting not the name of the reference but the value itself.
4 months ago
looks like you have private networking disabled
4 months ago
go ahead and enable that from within the service settings (doesnt matter what service)
Can you please point me to which sleep command will work in railway environment?
4 months ago
switch your runtime to v2 and you wont need to use sleep
4 months ago
all good?
4 months ago
branch?
4 months ago
ah, ill mark it as solved
4 months ago
!s
Status changed to Solved brody • 5 months ago