Skip to main content
ArcBlock Community

using prisma studio in prod

voidmanevoid
Developers
blocklet-server

i've setup a database using this guide that works locally. i've also setup the pre-install hook to create the database on prod. once i deploy the blocklet, is there a way i can use npx prisma studio for the prod database?

thanks!

5 replies

wangshijun22 months ago

Hi, prisma studio is designed to work in local dev environment? in production env, you can try: https://test.store.blocklet.dev/blocklets/z2qaDRj93qS1gyJuPPYsMvyC76Sw5YUD3oYPa

voidmanevoid22 months ago

thanks for the answer z1VV21NqNWkiadznN32ALkos5dQqQwnCMty ... i meant to ask what can i set the DATABASE_URL to so i can point at the prod db?

voidmanevoid22 months ago(edited)

oh it's likely this, right?

file:${urlJoin(env.dataDir, 'db/prd.db')}

so how can i find the dataDir?

wangshijun22 months ago
  1. You can try set DATABASE_URL to "{env.appDir}/path/to/db" to see if it can work, I have not confirmed this, 😄
  2. For security reasons if your server have file system isolation enabled, then the nocodb blocklet will not work (which need to be improved)
voidmanevoid22 months ago

thanks for the response! will try a few things and get it going. also going to look into nocodb.

Reply