- Rust/Axum backend skeleton with all crates, multi-stage Dockerfile - SvelteKit + TypeScript frontend with Tailwind CSS v4, adapter-node, Dockerfile - docker-compose.yml: db (postgres:16) → app → frontend → caddy with healthcheck and named volumes - Caddyfile: TLS via Let's Encrypt, cache headers, API/media routing to backend - .env.example: all environment variables documented with defaults - README.md: project overview, features, stack, deploy guide, roadmap - .gitignore: excludes secrets, build artifacts, node_modules, media uploads Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
373 B
Docker
22 lines
373 B
Docker
# --- Build stage ---
|
|
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# --- Runtime stage ---
|
|
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/build ./build
|
|
COPY --from=builder /app/package.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
EXPOSE 3001
|
|
ENV PORT=3001 HOST=0.0.0.0
|
|
CMD ["node", "build"]
|