Multi-stage Dockerfile builds SvelteKit then runs a lean production image. docker-compose.yml wires up MariaDB with health checks, the app, and Caddy for TLS termination. Caddyfile uses SITE_DOMAIN env var with localhost fallback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 lines
416 B
Docker
19 lines
416 B
Docker
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
COPY --from=builder /app/build ./build
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/package.json ./
|
|
COPY --from=builder /app/drizzle ./drizzle
|
|
COPY --from=builder /app/scripts ./scripts
|
|
|
|
ENV NODE_ENV=production
|
|
EXPOSE 3000
|
|
CMD ["node", "build"]
|