From 7f81331b3ebcbaf8ce8ccc1adc2e5870cb370cbe Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:28:40 +0700 Subject: [PATCH] feat: runtime migration --- Dockerfile | 4 +++- entrypoint.sh | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 39fe85e..c8d8da5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,4 +28,6 @@ COPY --from=deps /app/node_modules /app/node_modules COPY --from=build /app/dist /app/dist COPY --from=base /app/static /app/static -CMD ["pnpm", "run", "start"] +RUN chmod u+x ./entrypoint.sh + +ENTRYPOINT ["./entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..4d9a5e6 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +pnpm prisma migrate deploy +pnpm run start