Deploy problem for connect postgres with Prisma in NestJS.

Project Id: 41a0502e-3568-4da7-96db-3ed7adcd4ffc
19 Replies
Percy
Percy12mo ago
Project ID: 41a0502e-3568-4da7-96db-3ed7adcd4ffc
Brody
Brody12mo ago
can you show me how you are using that variable in your code or configs?
joaomarcusjesus
joaomarcusjesus12mo ago
in the code and and I'm putting the environment variable in the .env
Brody
Brody12mo ago
please don't use a .env file, it should be in your .gitignore can you connect to the database with something like pgadmin?
joaomarcusjesus
joaomarcusjesus12mo ago
Ok ok i will try
Brody
Brody12mo ago
let me know how that goes make sure you delete the .env file from your repo, I can see that the logs say variables where read from the .env file, anything in the .env will overwrite the variables injected by railway
joaomarcusjesus
joaomarcusjesus12mo ago
ok right I deleted it but the connection error continues
joaomarcusjesus
joaomarcusjesus12mo ago
Brody
Brody12mo ago
? are you aware that you just sent your database credentials in a public form?
joaomarcusjesus
joaomarcusjesus12mo ago
sorry i never connected postgres before
Brody
Brody12mo ago
please read the documentation for pgadmin
joaomarcusjesus
joaomarcusjesus12mo ago
The connection attempt failed.
Brody
Brody12mo ago
try restarting your database, the restart button is in the plugins settings
joaomarcusjesus
joaomarcusjesus12mo ago
it gave an error, but run the database and already populate the tables but still off
Brody
Brody12mo ago
can you show me the table at the top of the build logs please
joaomarcusjesus
joaomarcusjesus12mo ago
Brody
Brody12mo ago
alright so migrations ran, now I think you need this docs page https://docs.railway.app/troubleshoot/fixing-common-errors
joaomarcusjesus
joaomarcusjesus12mo ago
its work thanks u
Brody
Brody12mo ago
no problem