10 months ago
Hi! I've migrated to metal yesterday and got things working (huge thanks to Brody!). Now I'd like to "optimize" things a bit.
I have a directus app that is connected to a postgres db. Currently, the database has a TCP proxy, ie. publicly exposed if I understand correctly.
How could I change my configuration/variables references so that the database service is kept private?
Somewhat related: I face the issue mentionned at https://station.railway.com/questions/spinning-database-connection-33718874 but I don't think I can remove the PGHOST variable because of TCP stuff or that would break Directus.
I don't understand very well how everything interacts together so I've probably asked dumb things, forgive me!
Thanks for the help!
8 Replies
10 months ago
Hello,
You can simply remove the database's TCP Proxy to remove it from being publicly exposed.
Best,
Brody
Status changed to Awaiting User Response Railway • 11 months ago
10 months ago
Thanks that worked!
About the data panel being stuck on "Database Connection", I'm unsure what I should do. In the thread I mentionned, you talk about the PORT variable (I don't have one) and the TPC Proxy (I don't have one anymore either). Any idea?
Status changed to Awaiting Railway Response Railway • 11 months ago
Status changed to Awaiting User Response Railway • 11 months ago
10 months ago
Good to know thanks! I tried removing PGPORT (which was an empty string) but it's required by the data panel, so I set it to 5432 but it's still on "Database Connection"
Status changed to Awaiting Railway Response Railway • 11 months ago
Status changed to Awaiting User Response Railway • 11 months ago
Status changed to Awaiting Railway Response Railway • 11 months ago
10 months ago
It is displayed after adding a TCP Proxy, but honestly I would recommend to not mess around with the variables anymore, you could cause permanent data loss or lock yourself out of your database, and we do not offer data or password recovery services so you would be on your own if you got your database or variables into a bad state.
Status changed to Awaiting User Response Railway • 11 months ago
Status changed to Awaiting Railway Response Railway • 11 months ago
Status changed to Solved florian-lefebvre • 11 months ago