- character-builder/: Vue 3 + NestJS + Valkey app for planning house, class, character XP, 5 spec tracks, faction standing, and skill trees. Shareable via short link (POST /api/builds → 8-char nanoid). - character-builder/data/: parsed JSON tables (character XP through L200, 5 specs to L100, 2 faction standing tables, 5 class skill trees). - character-builder/scripts/extract.py: parser that regenerates data/*.json from the gitignored sample-data/*.html snapshots. - Dockerfile + docker-compose.yml: two-container deploy (app + Valkey). - specialization-calculator/: pre-existing single-file XP/quest calculator, carried into the repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
917 B
Docker
37 lines
917 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
# ---------- frontend build ----------
|
|
FROM node:22-alpine AS frontend-build
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package.json ./
|
|
RUN npm install --no-audit --no-fund
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# ---------- backend build ----------
|
|
FROM node:22-alpine AS backend-build
|
|
WORKDIR /app/backend
|
|
COPY backend/package.json ./
|
|
RUN npm install --no-audit --no-fund
|
|
COPY backend/ ./
|
|
RUN npm run build
|
|
|
|
# ---------- runtime ----------
|
|
FROM node:22-alpine AS runtime
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app
|
|
|
|
# Backend prod deps only.
|
|
COPY backend/package.json ./
|
|
RUN npm install --omit=dev --no-audit --no-fund
|
|
|
|
# Compiled backend, built frontend, baked data.
|
|
COPY --from=backend-build /app/backend/dist ./dist
|
|
COPY --from=frontend-build /app/frontend/dist ./public
|
|
COPY data ./data
|
|
|
|
ENV STATIC_ROOT=/app/public
|
|
ENV DATA_ROOT=/app/data
|
|
ENV PORT=3000
|
|
EXPOSE 3000
|
|
CMD ["node", "dist/main.js"]
|