aipan-netdisk-search/start.sh
lei 2a5876fa83 更新dockerfile
增加pm2配置文件
2024-11-12 20:15:00 +08:00

16 lines
539 B
Bash

#!/bin/sh
# 检查必要的环境变量是否已设置
: "${ADMIN_PASSWORD:?Need to set ADMIN_PASSWORD}"
: "${ADMIN_EMAIL:?Need to set ADMIN_EMAIL}"
: "${JWT_SECRET:?Need to set JWT_SECRET}"
: "${DATABASE_URL:?Need to set DATABASE_URL}"
: "${DATABASE_SCHEMA:?Need to set DATABASE_SCHEMA}"
echo "Running database migrations..."
# 执行数据库迁移,并指定 schema 文件的位置
npx prisma migrate deploy --schema=/app/prisma/schema.prisma
echo "Starting application..."
# 启动 Nuxt.js 应用
exec node .output/server/index.mjs