Initial commit: repo-vis — 3D codebase visualization
Rust (axum) backend with git clone / zip upload / SQLite cache. Three.js frontend with D3 treemap layout and semantic zoom. Docker deployment with musl static binary.
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Stage 1: Build frontend
|
||||
FROM node:22-slim AS frontend
|
||||
WORKDIR /build
|
||||
COPY web/package.json web/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY web/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Minimal runtime (binary built locally with musl)
|
||||
FROM alpine:3.21
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
|
||||
WORKDIR /app
|
||||
COPY server/target/x86_64-unknown-linux-musl/release/repo-vis-server ./
|
||||
COPY --from=frontend /build/dist ./web/dist/
|
||||
|
||||
ENV PORT=8080
|
||||
ENV FRONTEND_DIR=./web/dist
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./repo-vis-server"]
|
||||
Reference in New Issue
Block a user