10 months ago
I have a node server in my tcf-server
instance, and a postgres instance (tcf-pg
). I followed the instructions to create an env variable which references the private network database url:
DATABASE_URL = ${{tcf-pg.DATABASE_URL}}
The failure indicates that it is receiving the value properly, however the connection is failing:
1.321 Datasource "db": PostgreSQL database "railway", schema "public" at "postgres.railway.internal:5432"
1.404
1.404 Error: P1001: Can't reach database server at `postgres.railway.internal:5432`
1.404
1.404 Please make sure your database server is running at `postgres.railway.internal:5432`.
ⓘ Deployment information is only viewable by project members and Railway employees.
3 Replies
10 months ago
The private network is not available during build, please do the database actions during runtime before starting your app.
brody
The private network is not available during build, please do the database actions during runtime before starting your app.
4 months ago
Hey @brody, prisma connects to the database during build if you use the feature "typedSql", is there a workaround this?
alekzv9
Hey @brody, prisma connects to the database during build if you use the feature "typedSql", is there a workaround this?
4 months ago
Solved my issue. Hope this helps but during build command I used the public database url and then when the app is running I connect using the private