mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-06-12 02:10:56 +00:00
8ad580521d
* refactor: remove managed/standalone mode distinction from codebase Standalone mode is deprecated; managed mode is now the only mode. Remove redundant "managed mode" qualifiers from comments, docs, and error messages. Error strings now reference "database stores" instead of "managed mode" for clarity. * improve(onboard): streamline onboard process and env setup Simplify onboard wizard, extract helpers to dedicated file, update env example and entrypoint for default managed mode, clean up prepare-env script, update i18n catalogs.
32 lines
588 B
Bash
32 lines
588 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
case "${1:-serve}" in
|
|
serve)
|
|
# Auto-upgrade (schema migrations + data hooks) before starting.
|
|
if [ -n "$GOCLAW_POSTGRES_DSN" ]; then
|
|
echo "Running database upgrade..."
|
|
/app/goclaw upgrade || \
|
|
echo "Upgrade warning (may already be up-to-date)"
|
|
fi
|
|
exec /app/goclaw
|
|
;;
|
|
upgrade)
|
|
shift
|
|
exec /app/goclaw upgrade "$@"
|
|
;;
|
|
migrate)
|
|
shift
|
|
exec /app/goclaw migrate "$@"
|
|
;;
|
|
onboard)
|
|
exec /app/goclaw onboard
|
|
;;
|
|
version)
|
|
exec /app/goclaw version
|
|
;;
|
|
*)
|
|
exec /app/goclaw "$@"
|
|
;;
|
|
esac
|