Migrate from Next.js to SvelteKit
- Replace Next.js app with SvelteKit + adapter-node - basePath /bodenfeuchte configured in svelte.config.js - MQTT listener starts via hooks.server.ts on server boot - Chart.js replaces Recharts for the moisture graph - Dockerfile simplified: single build step, node build output - Removed custom server.ts (no longer needed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+6
-11
@@ -1,27 +1,22 @@
|
||||
FROM node:20-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache python3 make g++
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN npx tsc --project tsconfig.server.json
|
||||
|
||||
FROM node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/public ./public
|
||||
RUN apk add --no-cache python3 make g++
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --from=builder /app/build ./build
|
||||
|
||||
RUN mkdir -p data
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "dist/server.js"]
|
||||
ENV PORT=3000
|
||||
CMD ["node", "build"]
|
||||
|
||||
Reference in New Issue
Block a user