Can anyone share his `bash` script to run `npx pr...
# orm-help
d
Can anyone share his
bash
script to run
npx prisma migrate deploy
and afterwards start the node process? I think there is some waiting involved right? Trying to dockerize the app so I can run it in aws
r
hi @daemon - what you can try is put
npx prisma generate
into your
postinstall
in your
package.json
eg:
Copy code
"scripts": {
    "build": "tsc",
    "start": "node dist/server.js",
     ...
     ...
    "postinstall": "npx prisma generate"
  },
then when you deploy to docker you run the yarn/npm install and after that it will do the
npx risma generate
Obviously you can update that to
npx prisma migrate deploy
or I may be off the mark and what you may be looking for is simply:
Copy code
"scripts": {
    "start": "npx prisma migrate deploy && node dist/server.js",
     ...
     ...
  },
(you'd need to adjust the dist/server.js if your's is different)
d
Thanks a lot ser. Lemme keep hustling, if anything ill ping you. Great day.