run prisma studio on coolify database

Has anyone successfully ran prisma studio on a coolify self hosted server that could help walk me through it?
10 Replies
kapa.ai
kapa.ai2w ago
Hi @Captain Incredible. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources do not contain specific information about running Prisma Studio on a Coolify self-hosted server. The available sources discuss running Prisma Studio with Wasp projects, connecting to local or production databases (such as with Fly), and troubleshooting Prisma Studio issues, but they do not mention Coolify or provide a walkthrough for that environment. If your Coolify deployment exposes your database and you have the correct DATABASE_URL, you could try opening a tunnel to your database (as is done with Fly) and then running wasp db studio or npx prisma studio with the appropriate schema file. However, for detailed, step-by-step instructions specific to Coolify, the knowledge sources do not provide enough information to guide you further. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Captain Incredible, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
toticozeni
toticozeni2w ago
Hey, if the database is part of the prisma project you should be able to run the prisma studio through the terminal. If it's a wasp project, running wasp db studio should do it. If it's a plain prisma project npx prisma studio should do it instead. If you're self hosted you should be able to open up terminal to the project location. Need any specific help?
Captain Incredible
I think I'm just not super familiar with how coolify does things, I created a server and database resource. Typically was runs the client and server from the same command, "wasp start" but in coolify it seems like they are separated somehow. So I'm not sure if the wasp db studio command would find the database I might have to install prisma in the database resource?
toticozeni
toticozeni2w ago
Server and client are always separate in wasp, two entirely separate projects. We just start them both with a single command to make it easier for developers. I assume then you are deploying wasp artifacts to coolify? Honestly, I would recommend you to use any database client to connect instead then. prisma studio is made for development purposes. One example is DBeaver: https://dbeaver.io/ You just need to expose your database to public then.
Serge
DBeaver Community
DBeaver
MEE6
MEE62w ago
Wohooo @franjo, you just became a Waspeteer level 19!
Captain Incredible
Yeah I've just got the internal URL right now. I'll have to play around with it to see how to make it public. I didn't see any guides in coolify for that but I did see some fields I can look into in the database resource
toticozeni
toticozeni2w ago
They have a guide for it: https://coolify.io/docs/databases/ Also explanation for Ports Mapping vs Public Port. There is also: Access database during builds title
Captain Incredible
I see. I could use that for something like seeding right? So would I just throw a port number like say "80" I'm the public port? Then how would I connect?
toticozeni
toticozeni2w ago
If you really want to use prisma studio instead, you could try to open up a terminal, navigate to wasp server project and use npx prisma studio , but you would have to set up the schema file and rest yourself, which is some hassel. You should have the public URL provided by Coolify. Use that url with the correct port number. If you have firewall on your VPS you should also enable network for that port number.
Captain Incredible
Ok. I'll take a look tomorrow, got to get some Zzz then I'll see if it's easier than I remember looking at it earlier today.

Did you find this page helpful?