chore: prepare docker container for prisma database
This commit is contained in:
parent
29e7d47546
commit
904547b50f
3 changed files with 18 additions and 1 deletions
10
entrypoint.sh
Executable file
10
entrypoint.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Running start script with user $(whoami) and NODE_ENV $NODE_ENV"
|
||||
if [ "$NODE_ENV" == "production" ]; then
|
||||
if [ -d "prisma/migrations" ]; then
|
||||
echo "Running Prisma migrations"
|
||||
npx prisma migrate deploy
|
||||
fi
|
||||
fi
|
||||
exec node server.js
|
Loading…
Add table
Add a link
Reference in a new issue