全部服务运行中

Nexora
智能研发平台

一站式自托管研发基础设施 — 代码管理、知识协作、服务监控、容器编排、团队沟通,统一认证,开箱即用。

平台服务

所有服务通过 Gitea 统一账号体系登录,一个账号访问全部平台。

📚 平台文档

详细文档托管在 Outline 知识库,点击直接阅读。

快速开始

从零开始,5 分钟上手 Nexora 平台。

1

登录账号

所有平台服务使用 Gitea 统一账号登录。首次使用请联系管理员创建账号,然后访问 Gitea 修改初始密码。

📌 登录地址

https://gitea.nexora.restry.cn

其他服务(Outline、Portainer 等)点击 "通过 Nexora Git 登录" 即可 SSO 跳转。

2

配置 SSH Key

推送代码需要 SSH 密钥认证:

# 生成 SSH Key(如果还没有)
ssh-keygen -t ed25519 -C "your-email@nexora.dev"

# 复制公钥
cat ~/.ssh/id_ed25519.pub

# 粘贴到 Gitea → 设置 → SSH/GPG Keys → 添加密钥
3

导入已有代码

从 GitHub/GitLab 等平台迁移仓库:

  1. 登录 Gitea → 右上角 +迁移外部仓库
  2. 选择来源平台(GitHub、GitLab、Gitea 等)
  3. 填入仓库 URL(支持 HTTPS 和 SSH)
  4. 如果是私有仓库,填入访问令牌
  5. 选择是否迁移 Issues、PR、Labels 等
  6. 点击 迁移仓库,等待完成

💡 也可以命令行迁移:

# 克隆原仓库(含所有分支和标签)
git clone --mirror https://github.com/org/repo.git

# 推送到 Nexora Gitea
cd repo.git
git remote set-url origin ssh://git@gitea.nexora.restry.cn:2222/your-username/repo.git
git push --mirror
4

新建代码仓库

# 方式一:网页创建
# Gitea → + → 创建仓库 → 填写名称/描述 → 创建

# 方式二:命令行推送新项目
mkdir my-project && cd my-project
git init && git checkout -b main
echo "# My Project" > README.md
git add . && git commit -m "init: project scaffold"
git remote add origin ssh://git@gitea.nexora.restry.cn:2222/your-username/my-project.git
git push -u origin main

开发流程

规范化的三环境 + Git Flow 工作流,保障代码质量与部署安全。

🏗️ 三环境架构

🟢

Development

开发环境 — 自由实验,快速迭代

  • • 分支:feature/*
  • • 部署:本地 / Docker Compose
  • • 数据库:独立开发库
  • • 域名:dev-*.nexora.restry.cn
🟡

Staging

测试环境 — 集成测试,验收确认

  • • 分支:develop
  • • 部署:PR 合并后自动部署
  • • 数据库:测试数据(可重置)
  • • 域名:staging-*.nexora.restry.cn
🔴

Production

生产环境 — 稳定可靠,审批发布

  • • 分支:main(打 tag)
  • • 部署:审批后触发
  • • 数据库:生产数据(定时备份)
  • • 域名:*.nexora.restry.cn

🌿 Git 分支策略

main (生产)     ─────●──────────────────●─────── 稳定发布
                      ↑                  ↑
release/*        ────●── 测试修复 ──●    │      发版准备
                     ↑              ↓    ↑
develop (集成)  ──●──●──●──●──●──●──●──●──●──── 日常集成
                  ↑  ↑     ↑
feature/login  ──●──●     │                     功能分支
feature/api    ───────●──●                      功能分支
hotfix/*                                ──●──── 紧急修复 → main + develop
main — 生产代码,只接受 release 和 hotfix 合并
develop — 集成分支,feature 完成后合并到此
feature/* — 功能开发,从 develop 拉出
release/* — 发版准备,冻结功能只修 bug
hotfix/* — 紧急修复,从 main 拉出

🔄 日常开发流程

# 1. 从 develop 拉功能分支
git checkout develop && git pull
git checkout -b feature/user-auth

# 2. 开发 & 提交
git add . && git commit -m "feat: add JWT authentication"

# 3. 推送并创建 Pull Request
git push -u origin feature/user-auth
# → 在 Gitea 上创建 PR → develop

# 4. 代码审查 + CI 通过 → 合并
# → Staging 自动部署,QA 验证

# 5. 发版
git checkout -b release/v1.0.0 develop
# 测试修复后 → 合并到 main + develop
git tag v1.0.0
git push --tags
# → Production 部署

⚡ CI/CD 自动化

使用 Gitea Actions(兼容 GitHub Actions 语法):

git push Build Test Deploy Notify
# .gitea/workflows/ci.yml
name: CI Pipeline
on:
  push:
    branches: [develop, main]
  pull_request:
    branches: [develop]

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: npm ci && npm run build
      - name: Test
        run: npm test
      - name: Deploy to Staging
        if: github.ref == 'refs/heads/develop'
        run: echo "Deploy to staging..."
      - name: Deploy to Production
        if: startsWith(github.ref, 'refs/tags/v')
        run: echo "Deploy to production..."

团队成员

平台账号统一由 Gitea 管理,以下为当前团队成员。

👨‍💼

admin

管理员

admin@nexora.dev

👩‍💻

dev-alice

开发

alice@nexora.dev

👨‍💻

dev-bob

开发

bob@nexora.dev

🧪

qa-charlie

测试

charlie@nexora.dev

需要新建账号?联系管理员或在 Mattermost 找 🦞 Nexora AI 协助。

统一认证 (SSO)

Gitea 作为 OAuth2/OIDC Provider,一个账号登录所有服务。

Outline Portainer 新服务... 🗃️ Gitea OAuth ✅ 登录成功

接入新服务到 Gitea SSO

  1. 登录 Gitea → 站点管理应用创建 OAuth2 应用
  2. 填写应用名称和回调 URL(如 https://new-service.nexora.restry.cn/callback
  3. 获取 Client IDClient Secret
  4. 在新服务中配置 OIDC:
    Authorization URL: https://gitea.nexora.restry.cn/login/oauth/authorize
    Token URL:         https://gitea.nexora.restry.cn/login/oauth/access_token
    Userinfo URL:      https://gitea.nexora.restry.cn/login/oauth/userinfo
  5. 用户点击 "通过 Nexora Git 登录" 即可 SSO 跳转 ✅

基础架构

全容器化部署,FRP 内网穿透,Caddy 自动 TLS。


┌─────────────────────────────────────────────────────────────┐
│                    外网用户 (HTTPS)                          │
└─────────────────────┬───────────────────────────────────────┘
                      ↓
┌─────────────────────────────────────────────────────────────┐
│  fw-n2 (40.162.94.187) — FRP Server                        │
│  *.nexora.restry.cn → FRP 隧道                              │
└─────────────────────┬───────────────────────────────────────┘
                      ↓ HTTP/HTTPS 隧道
┌─────────────────────────────────────────────────────────────┐
│  claw-bot (192.168.31.141) — FRP Client                     │
│  ┌────────────────────────────────────────────────────────┐ │
│  │  Caddy (TLS 终结 + 反向代理)                            │ │
│  │  ├── gitea.nexora.restry.cn    → Gitea:3000            │ │
│  │  ├── outline.nexora.restry.cn  → Outline:3000          │ │
│  │  ├── uptime.nexora.restry.cn   → Uptime Kuma:3001      │ │
│  │  ├── portainer.nexora.restry.cn→ Portainer:9000        │ │
│  │  └── www.nexora.restry.cn      → 静态文件 (本站)        │ │
│  └────────────────────────────────────────────────────────┘ │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────────────┐  │
│  │ Gitea    │ │ Outline  │ │ Postgres │ │ Uptime Kuma   │  │
│  └──────────┘ └──────────┘ └──────────┘ └───────────────┘  │
│  ┌──────────┐ ┌──────────┐ ┌──────────────────────────────┐ │
│  │Portainer │ │  Redis   │ │ 🦞 Nexora AI (OpenClaw)     │ │
│  └──────────┘ └──────────┘ └──────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘