首页
/ PlatformPlatform 项目下载及安装教程

PlatformPlatform 项目下载及安装教程

2024-12-09 23:40:25作者:仰钰奇

1. 项目介绍

PlatformPlatform 是一个用于构建企业级多租户产品的平台,使用 Azure、.NET、React、TypeScript 和 Infrastructure as Code 等技术。该项目处于 Alpha 阶段,旨在帮助开发者快速启动并构建高质量的 B2B 和 B2C 云 SaaS 产品。

2. 项目下载位置

要下载 PlatformPlatform 项目,请使用以下命令:

git clone https://github.com/platformplatform/PlatformPlatform.git

3. 项目安装环境配置

3.1 Windows 环境配置

3.1.1 安装 Windows Subsystem for Linux (WSL)

打开 PowerShell 终端并以管理员身份运行以下命令:

wsl --install

重启计算机(如果提示)。

3.1.2 安装 .NET、Git、Docker Desktop、Node.js、Azure CLI 和 GitHub CLI

在 PowerShell 终端中运行以下命令:

@(
    "Microsoft.DotNet.SDK.8",
    "Git.Git",
    "Docker.DockerDesktop",
    "OpenJS.NodeJS",
    "Microsoft.AzureCLI",
    "GitHub.cli"
) | ForEach-Object {
    winget install --accept-package-agreements --accept-source-agreements --id $_
}

3.2 macOS 环境配置

3.2.1 安装 Homebrew

打开终端并运行以下命令:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

3.2.2 安装 .NET、Git、Docker、Node.js、Azure CLI 和 GitHub CLI

在终端中运行以下命令:

brew install --cask dotnet-sdk
brew install git docker node azure-cli gh

3.3 Linux/WSL2 环境配置

3.3.1 安装 Wget

打开终端并运行以下命令:

sudo apt update && sudo apt-get install wget -y

3.3.2 安装 .NET SDK、Node.js、GitHub CLI 和 Azure CLI

在终端中运行以下命令:

sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0 nodejs gh
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

4. 项目安装方式

4.1 克隆项目

使用以下命令克隆项目到本地:

git clone https://github.com/platformplatform/PlatformPlatform.git
cd PlatformPlatform

4.2 运行项目

在项目根目录下运行以下命令启动项目:

cd application/AppHost
dotnet run

5. 项目处理脚本

5.1 配置 CI/CD

在项目根目录下运行以下命令以配置 CI/CD:

cd developer-cli
dotnet run configure-continuous-deployments

5.2 添加详细日志

如果需要查看详细日志,可以在命令后添加 --verbose-logging 参数:

dotnet run configure-continuous-deployments --verbose-logging

通过以上步骤,您可以成功下载并安装 PlatformPlatform 项目,并配置 CI/CD 环境。

登录后查看全文
热门项目推荐