panel — open-source game server manager (public release)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Local dev helper: start Postgres, then foreground the controller.
|
||||
# Run the agent separately in another terminal: go run ./agent/cmd/agent --insecure
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo ">> starting postgres"
|
||||
docker compose -f docker-compose.dev.yml up -d postgres
|
||||
|
||||
echo ">> waiting for postgres to be healthy"
|
||||
for _ in {1..30}; do
|
||||
if docker inspect -f '{{.State.Health.Status}}' panel-postgres 2>/dev/null | grep -q healthy; then
|
||||
echo ">> postgres healthy"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo ">> running controller (Ctrl-C to stop)"
|
||||
exec go run ./controller/cmd/controller "$@"
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerate protobuf Go stubs.
|
||||
# Requires: buf, protoc-gen-go, protoc-gen-go-grpc on $PATH.
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
if ! command -v buf >/dev/null 2>&1; then
|
||||
echo "error: buf not on PATH" >&2
|
||||
echo "install: go install github.com/bufbuild/buf/cmd/buf@latest" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ">> buf lint"
|
||||
buf lint
|
||||
|
||||
echo ">> buf generate"
|
||||
buf generate
|
||||
|
||||
echo ">> tidy go modules"
|
||||
for dir in proto controller agent; do
|
||||
(cd "$dir" && go mod tidy)
|
||||
done
|
||||
|
||||
echo ">> done"
|
||||
Reference in New Issue
Block a user