feat(build): embed static assets into Go binary
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
This commit is contained in:
2026-02-22 20:36:03 -05:00
parent 93b5c3f110
commit 59de41f827
7 changed files with 30 additions and 61 deletions

View File

@@ -4,6 +4,9 @@ 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
@@ -11,6 +14,7 @@ backend:
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 &