跳到主要内容
ArcBlock Community

using prisma studio in prod

voidmanevoid
开发者
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 条回复

wangshijun22个月前

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个月前

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个月前(edited)

oh it's likely this, right?

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

so how can i find the dataDir?

wangshijun22个月前
  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个月前

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

回复