Deploy problem for connect postgres with Prisma in NestJS.

Project Id: 41a0502e-3568-4da7-96db-3ed7adcd4ffc
19 Replies
Percy
Percy17mo ago
Project ID: 41a0502e-3568-4da7-96db-3ed7adcd4ffc
Brody
Brody17mo ago
can you show me how you are using that variable in your code or configs?
joaomarcusjesus
joaomarcusjesusOP17mo ago
in the code and and I'm putting the environment variable in the .env
Brody
Brody17mo 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
joaomarcusjesusOP17mo ago
Ok ok i will try
Brody
Brody17mo 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
joaomarcusjesusOP17mo ago
ok right I deleted it but the connection error continues
joaomarcusjesus
joaomarcusjesusOP17mo ago
Brody
Brody17mo ago
? are you aware that you just sent your database credentials in a public form?
joaomarcusjesus
joaomarcusjesusOP17mo ago
sorry i never connected postgres before
Brody
Brody17mo ago
please read the documentation for pgadmin
joaomarcusjesus
joaomarcusjesusOP17mo ago
The connection attempt failed.
Brody
Brody17mo ago
try restarting your database, the restart button is in the plugins settings
joaomarcusjesus
joaomarcusjesusOP17mo ago
it gave an error, but run the database and already populate the tables but still off
Brody
Brody17mo ago
can you show me the table at the top of the build logs please
joaomarcusjesus
joaomarcusjesusOP17mo ago
Brody
Brody17mo ago
alright so migrations ran, now I think you need this docs page https://docs.railway.app/troubleshoot/fixing-common-errors
joaomarcusjesus
joaomarcusjesusOP17mo ago
its work thanks u
Brody
Brody17mo ago
no problem
Want results from more Discord servers?
Add your server