Start-Command für Production hinzufügen

This commit is contained in:
2026-08-30 11:52:45 +02:00
parent f726c53c71
commit 4cdf460f73
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -12,7 +12,13 @@ RUN npm run build
FROM base AS runtime FROM base AS runtime
COPY --from=build /app/.output ./.output 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 ./ COPY package.json ./
ENV NODE_ENV=production ENV NODE_ENV=production
EXPOSE 3000 EXPOSE 3000
CMD ["node", ".output/server/index.mjs"] COPY entrypoint.sh ./
RUN chmod +x entrypoint.sh
CMD ["./entrypoint.sh"]
+3
View File
@@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
set -e set -e
echo "Running database migration..."
npm run db:migrate
echo "Running database seed..." echo "Running database seed..."
npm run db:seed npm run db:seed