React-Frontend ausliefern, altes Vanilla-Frontend entfernt
- frontend.go: Seitenrouten liefern die index.html (no-cache), gehashte Assets unter /assets dauerhaft cachebar, sonst echtes 404 - /stats als Seite, /stats.html leitet per 301 weiter - Containerfile: Node-Stage baut das Frontend nach web/ - Vite baut nach ../web (gitignored); web/ (Vanilla-JS) gelöscht - notes/frontend.md, deploy.md angepasst Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TiXsPUqw7oeomZ8wZrQW5q
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
728ac9b45e
commit
9cac33d167
+11
-1
@@ -1,3 +1,13 @@
|
||||
# Frontend-Stage: React-Build nach /src/web (siehe frontend/vite.config.ts).
|
||||
# Erst nur die Paketdateien, damit npm ci bei reinen Code-Änderungen aus dem
|
||||
# Cache kommt.
|
||||
FROM docker.io/library/node:24-alpine AS frontend
|
||||
WORKDIR /src/frontend
|
||||
COPY frontend/package.json frontend/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Build-Stage: statisches Binary, CGO aus (pgx und modernc.org/sqlite für den
|
||||
# einmaligen Import sind pures Go).
|
||||
FROM docker.io/library/golang:1.26-alpine AS build
|
||||
@@ -12,7 +22,7 @@ FROM docker.io/library/alpine:3.22
|
||||
RUN adduser -D -u 1000 kver
|
||||
WORKDIR /app
|
||||
COPY --from=build /kver /usr/local/bin/kver
|
||||
COPY web/ web/
|
||||
COPY --from=frontend /src/web web/
|
||||
COPY static/ static/
|
||||
# data: GeoLite2-ASN-DB (und die alte SQLite-DB für den Import);
|
||||
# static/media: Uploads. Beide als Volume persistieren.
|
||||
|
||||
Reference in New Issue
Block a user