Some checks failed
continuous-integration/drone/push Build is failing
Embed frontend build output directly into Go binary using //go:embed. This removes runtime dependency on ../frontend/public/ path and simplifies Docker builds by serving assets from embedded filesystem. - Add backend/web/embed.go with embed.FS directive - Update server to serve from embedded static assets - Update Makefile to copy frontend build to web/static/ - Update Dockerfile for simplified multi-stage build - Update frontend package.json output paths - Remove custom 'oc' command from flake.nix dev shell
31 lines
665 B
Makefile
31 lines
665 B
Makefile
.PHONY: all frontend backend clean dev docker docker-run tests
|
|
|
|
all: frontend backend
|
|
|
|
frontend:
|
|
cd frontend && bun run build
|
|
mkdir -p backend/web/static
|
|
cp frontend/public/index.html backend/web/static/ 2>/dev/null || true
|
|
cp -r frontend/public/pages backend/web/static/ 2>/dev/null || true
|
|
|
|
backend:
|
|
cd backend && go build -o ./dist/aethera ./cmd
|
|
|
|
clean:
|
|
rm -rf frontend/public/dist
|
|
rm -rf backend/dist
|
|
rm -rf backend/web/static
|
|
|
|
dev:
|
|
cd backend && go run ./cmd --listen 0.0.0.0 &
|
|
cd frontend && bun run dev
|
|
|
|
docker:
|
|
docker build -t aethera .
|
|
|
|
docker-run:
|
|
docker run -p 8080:8080 -v aethera-data:/app/data aethera
|
|
|
|
tests:
|
|
cd backend && go test ./...
|