feat: add Docker deployment (Dockerfile, compose, Caddyfile)

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>
This commit is contained in:
2026-03-26 12:49:42 -05:00
co-authored by Claude Sonnet 4.6
parent c6b7d4d4eb
commit b0bd8277a8
3 changed files with 73 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
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"]