♻️ Build on PocketBase defaults in container and tasks

This commit is contained in:
2026-11-30 17:39:27 +00:00
parent bb5ba06110
commit 74ebd2b38f
4 changed files with 32 additions and 19 deletions
+11 -12
View File
@@ -12,12 +12,6 @@ auto = true
go = "1.27.0"
node = "24.14.0"
[env]
AUTH_TOKEN = "devtoken"
PORT = "8080"
DB_PATH = "wotra.db"
TZ = "UTC"
[tasks.build]
description = "Build production single binary (web + Go, sequential)"
run = """
@@ -32,20 +26,20 @@ run = "npm run build"
[tasks."build:go"]
description = "Build Go binary with embedded web assets"
run = "go build -tags production -o wotra ./cmd/wotra"
run = "go build -trimpath -o wotra ."
[tasks.dev]
description = "Start Go API and Vite dev server concurrently"
description = "Start PocketBase API and Vite dev server concurrently"
run = """
echo "Go API: http://localhost:${PORT}"
echo "PocketBase API: http://localhost:8080 (admin UI: /_/)"
echo "Vite UI: http://localhost:5173"
mise run dev:api & mise run dev:ui
wait
"""
[tasks."dev:api"]
description = "Start Go API server"
run = "go run ./cmd/wotra"
description = "Start PocketBase API server"
run = "go run . serve --http=127.0.0.1:8080"
[tasks."dev:ui"]
description = "Start Vite dev server"
@@ -65,9 +59,14 @@ run = "npm test"
description = "Run Go tests and frontend Vitest tests"
depends = ["test", "test:web"]
[tasks.check]
description = "Lint and typecheck"
run = ["go vet ./...", "test -z \"$(gofmt -l .)\"", "npm --prefix web run check"]
[tasks.clean]
description = "Remove build artifacts"
run = """
rm -f wotra
rm -rf web/build web/.svelte-kit
rm -rf web/build web/.svelte-kit web/dev-dist
mkdir -p web/build && touch web/build/.gitkeep
"""