Start-Command für Production hinzufügen

This commit is contained in:
2026-08-30 11:45:30 +02:00
parent e4f9084059
commit 12c0754341
3 changed files with 16 additions and 2 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"]
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
set -e
echo "Running database seed..."
npm run db:seed
echo "Starting server..."
exec node .output/server/index.mjs
+1 -1
View File
@@ -31,6 +31,7 @@
"tailwind-merge": "^3.0.2", "tailwind-merge": "^3.0.2",
"tailwindcss": "^4.1.18", "tailwindcss": "^4.1.18",
"three": "^0.185.1", "three": "^0.185.1",
"tsx": "^4.21.0",
"tw-animate-css": "^1.3.6" "tw-animate-css": "^1.3.6"
}, },
"devDependencies": { "devDependencies": {
@@ -46,7 +47,6 @@
"@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-react": "^6.0.1",
"babel-plugin-react-compiler": "^1.0.0", "babel-plugin-react-compiler": "^1.0.0",
"dotenv": "^17.3.1", "dotenv": "^17.3.1",
"tsx": "^4.21.0",
"typescript": "^6.0.2", "typescript": "^6.0.2",
"vite": "^8.0.0" "vite": "^8.0.0"
} }