mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-07-31 12:20:48 +00:00
Multi-agent AI gateway with WebSocket RPC, HTTP API, and messaging channel integrations. Go port of OpenClaw with multi-tenant PostgreSQL, per-user isolation, security hardening, and production observability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
602 B
Bash
28 lines
602 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
case "${1:-serve}" in
|
|
serve)
|
|
# Managed mode: auto-run migrations before starting
|
|
if [ "$GOCLAW_MODE" = "managed" ] && [ -n "$GOCLAW_POSTGRES_DSN" ]; then
|
|
echo "Managed mode: running migrations..."
|
|
/app/goclaw migrate up --migrations-dir "$GOCLAW_MIGRATIONS_DIR" || \
|
|
echo "Migration warning (may already be up-to-date)"
|
|
fi
|
|
exec /app/goclaw
|
|
;;
|
|
migrate)
|
|
shift
|
|
exec /app/goclaw migrate "$@"
|
|
;;
|
|
onboard)
|
|
exec /app/goclaw onboard
|
|
;;
|
|
version)
|
|
exec /app/goclaw version
|
|
;;
|
|
*)
|
|
exec /app/goclaw "$@"
|
|
;;
|
|
esac
|