This commit is contained in:
parent
0dc05b5519
commit
f70c11c4de
|
|
@ -413,15 +413,14 @@ COPY --from=s3final migrations /supabase/storage-api/migrations
|
|||
# # 拷贝依赖声明并安装仅生产依赖
|
||||
COPY chatbot-ui/package.json chatbot-ui/package-lock.json supabase/chatai-ui/
|
||||
WORKDIR /supabase/chatai-ui
|
||||
#RUN npm ci --omit=dev
|
||||
RUN npm ci
|
||||
|
||||
# 拷贝构建产物和依赖
|
||||
COPY --from=chataibuilder /app/.next ./.next
|
||||
COPY --from=chataibuilder /app/public ./public
|
||||
#COPY --from=chataibuilder /app/node_modules supabase/chatai-ui/node_modules
|
||||
COPY --from=chataibuilder /app/next.config.js ./next.config.js
|
||||
COPY chatbot-ui/.env.local ./.env.local
|
||||
COPY chatbot-ui/supabase ./supabase
|
||||
|
||||
WORKDIR /
|
||||
ENV NODE_ENV=production
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export PGUSER=supabase_admin
|
||||
export PGPASSWORD=postgres
|
||||
export PGHOST=127.0.0.1
|
||||
export PGPORT=5432
|
||||
export PGDATABASE=postgres
|
||||
|
||||
echo "Running migrations..."
|
||||
|
||||
for file in $(ls /supabase/migrations/*.sql | sort); do
|
||||
echo "Executing $file"
|
||||
psql -f "$file"
|
||||
done
|
||||
|
||||
echo "Running seed.sql..."
|
||||
psql -f /supabase/seed.sql
|
||||
|
||||
echo "All SQL scripts executed successfully."
|
||||
Loading…
Reference in New Issue