diff --git a/Dockerfile b/Dockerfile index 97432dd..dd45849 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,4 +35,6 @@ EXPOSE 3000 ENV PORT=3000 ENV HOSTNAME="0.0.0.0" -CMD ["node", "server.js"] \ No newline at end of file +COPY entrypoint.sh /app/entrypoint.sh +RUN chmod +x /app/entrypoint.sh +ENTRYPOINT ["/app/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..2b9e562 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# entrypoint.sh + +echo "Running database push..." +npx prisma db push + +echo "Starting application..." +node server.js \ No newline at end of file