Toolhub / start.sh
unifare
Initial commit: ToolHub ASP.NET Core app
5fc700d
#!/bin/bash
# 设置错误时退出
set -e
echo "Starting ToolHub application..."
# 检查数据库文件是否存在,如果不存在则创建
if [ ! -f "/app/data/toolhub.db" ]; then
echo "Database file not found, will be created on first run"
# 确保数据目录存在
mkdir -p /app/data
fi
# 设置数据库连接字符串
export ConnectionStrings__DefaultConnection="Data Source=/app/data/toolhub.db"
# 启动ASP.NET Core应用
echo "Starting ASP.NET Core application on port 7860..."
exec dotnet ToolHub.dll