diff --git a/Dockerfile b/Dockerfile index aa5995e..adb694b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,4 +35,4 @@ COPY --from=build /app/.sern ./.sern COPY --from=build /app/package.json ./package.json COPY --from=build /app/prisma ./prisma -CMD ["bun", "dist/index.js"] +CMD ["sh", "-c", "bun run db:migrate && bun dist/index.js"] diff --git a/package.json b/package.json index 53526d4..b25b8ca 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "build": "sern build", "start": "bun run --inspect .", + "db:migrate": "prisma migrate deploy", "install": "sern build", "commands:publish": "sern commands publish", "dev": "sern build -w --watch-command \"bun start\"",