I’m having issues with prisma, when specifying the DATABASE_URL to the internal built-in variable, I get a can’t reach database error, from dockerfile and when using buildpack.
The database is set on private.
a random dockerfile to test
COPY . .
RUN npm install --legacy-peer-deps
RUN npx prisma migrate deploy
CMD ["npm", "run", "start"]
In a nutshell , you can’t run RUN npx prisma migrate deploy since it’s executed at the build time of your container and the build process does not have access to your database. I would recommend using an entrypoint.sh and executing the migrate command before that your node process starts. You can take a look at this guide.