From 4cdf460f73c472af3006b27399e4b681618cbac3 Mon Sep 17 00:00:00 2001 From: Mathias Hurler Date: Sun, 30 Aug 2026 11:52:45 +0200 Subject: [PATCH] =?UTF-8?q?Start-Command=20f=C3=BCr=20Production=20hinzuf?= =?UTF-8?q?=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 +++++++- entrypoint.sh | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1741aaa..35e9a79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,13 @@ RUN npm run build FROM base AS runtime COPY --from=build /app/.output ./.output +COPY --from=build /app/node_modules ./node_modules +COPY --from=build /app/scripts ./scripts +COPY --from=build /app/src/db ./src/db +COPY --from=build /app/src/lib ./src/lib COPY package.json ./ ENV NODE_ENV=production EXPOSE 3000 -CMD ["node", ".output/server/index.mjs"] \ No newline at end of file +COPY entrypoint.sh ./ +RUN chmod +x entrypoint.sh +CMD ["./entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 64529c6..80b594a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,9 @@ #!/bin/sh set -e +echo "Running database migration..." +npm run db:migrate + echo "Running database seed..." npm run db:seed