Files
bodenfeuchte/Dockerfile
T
admin 534c055598 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>
2026-05-15 20:49:33 +02:00

23 lines
404 B
Docker

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
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
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
ENV PORT=3000
CMD ["node", "build"]