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:
30
Makefile
Normal file
30
Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
.PHONY: build-server build-web build deploy clean
|
||||
|
||||
MUSL_TARGET := x86_64-unknown-linux-musl
|
||||
CONTAINER := repo-vis
|
||||
IMAGE := repo-vis:latest
|
||||
PORT := 9120
|
||||
|
||||
build-server:
|
||||
cd server && cargo build --release --target $(MUSL_TARGET)
|
||||
|
||||
build-web:
|
||||
cd web && npm run build
|
||||
|
||||
build: build-server build-web
|
||||
|
||||
deploy: build
|
||||
-docker stop $(CONTAINER) 2>/dev/null
|
||||
-docker rm $(CONTAINER) 2>/dev/null
|
||||
docker build -t $(IMAGE) .
|
||||
docker run -d \
|
||||
--name $(CONTAINER) \
|
||||
-p $(PORT):8080 \
|
||||
-v repo-vis-data:/app/data \
|
||||
--restart unless-stopped \
|
||||
$(IMAGE)
|
||||
@echo "repo-vis running at http://localhost:$(PORT)"
|
||||
|
||||
clean:
|
||||
cd server && cargo clean
|
||||
rm -rf web/dist
|
||||
Reference in New Issue
Block a user