Skip to content

Building from source

Repository: aaaSaZaN/gowave.

  • backend-go/ - the Go backend (module gowave).
  • frontend/ - the web interface on React, TypeScript and Vite.

Use the Bun version from frontend/package.json (packageManager) and the Go version from backend-go/go.mod.

Окно терминала
git clone https://github.com/aaaSaZaN/gowave.git
cd gowave
# Web interface
cd frontend
bun install --frozen-lockfile
bun run editor:download
bun run build
bun run editor:compress
cd ..
# Backend
cd backend-go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o gowave-linux-amd64 ./cmd/server
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o gowave-linux-arm64 ./cmd/server

The web interface is not embedded in the binary: the panel looks for frontend/dist next to its working directory.

Build the image from source instead of pulling from ghcr.io:

Окно терминала
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build
Окно терминала
cd backend-go
go vet ./...
go test -race -count=1 ./...

Tests use in-memory SQLite by default. For PostgreSQL:

Окно терминала
GOWAVE_TEST_POSTGRES='postgres://gowave:gowave@localhost:5432/gowave_test?sslmode=disable' go test -count=1 ./...