refactor: Complete technical debt remediation (all steps)
Extracted TagMatcher, DownloadAssembler, DownloadBuilder, and WebhookStatus services Slimmed dashboard.js from 1360 → 284 lines (pure HTTP layer) Created server/routes/status.js and mounted at /api/status Migrated frontend to vanilla ES modules under client/src/ Eliminated all tag-badge and client-logo duplication Wired Vite build into Dockerfile and removed obsolete public/app.js Added comprehensive DownloadBuilder regression tests
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -9,6 +9,18 @@ WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Stage 1.5 — client-build: build frontend with Vite
|
||||
# ---------------------------------------------------------------------------
|
||||
FROM node:22-alpine AS client-build
|
||||
|
||||
WORKDIR /app/client
|
||||
|
||||
COPY client/package.json client/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY client/ ./
|
||||
RUN npm run build
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Stage 2 — runtime image (minimal attack surface)
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -33,6 +45,7 @@ COPY --from=deps /app/node_modules ./node_modules
|
||||
# Copy application source owned by root (read-only at runtime)
|
||||
COPY --chown=root:root server/ ./server/
|
||||
COPY --chown=root:root public/ ./public/
|
||||
COPY --from=client-build --chown=root:root /app/public/app.js ./public/app.js
|
||||
COPY --chown=root:root package.json ./
|
||||
# Bundled snakeoil certificate for out-of-the-box TLS (self-signed, localhost only).
|
||||
# Mount your own cert/key over /app/certs/ or set TLS_CERT/TLS_KEY env vars.
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user