diff --git a/supabase/chatai-ui/wrapper.sh b/supabase/chatai-ui/wrapper.sh new file mode 100644 index 0000000..fd3be4c --- /dev/null +++ b/supabase/chatai-ui/wrapper.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +# 直接启动已构建好的 Next.js app,监听 0.0.0.0 +exec node node_modules/next/dist/bin/next start -H 0.0.0.0 diff --git a/supabase/postgres/supervisord.conf b/supabase/postgres/supervisord.conf index b742def..21ab8f4 100644 --- a/supabase/postgres/supervisord.conf +++ b/supabase/postgres/supervisord.conf @@ -53,4 +53,9 @@ redirect_stderr=true stdout_logfile=auto - +[program:chatai-ui] +command=/bin/bash /supabase/chatai-ui/wrapper.sh +user=root +autorestart=true +stderr_logfile=/var/log/chatai-ui.err.log +stdout_logfile=/var/log/chatai-ui.out.log