- Open the file
docker-compose.yaml
and modify theDATABASE_URL
according to your database - If the database is a docker service running on the existing machine, uncomment the
networks
and put the *correct network name - do
docker-compose up
in this directory to startprisma-init
service which would migrate the table.
To find the network name, inspect the db container and search for NetworkMode
Docker
Image ghcr.io/holashchand/prisma-init:1.0.0
can be used or use cmd make build
to build your own image.
Docker, Make
- Clone the project from git
- Create a
.env
file withDATABASE_URL
ie. for postgresql it looks like
DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"
- Run
npm run migrate:prod
Node, npm