chore(devcontainer): update docs

This commit is contained in:
Jacky 2025-02-04 10:25:51 +08:00
parent 19def6ea3b
commit d13d9c34e7
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
6 changed files with 149 additions and 0 deletions

View file

@ -24,6 +24,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
text: 'Development',
collapsed: false,
items: [
{ text: 'Devcontainer', link: '/guide/devcontainer' },
{ text: 'Build', link: '/guide/build' },
{ text: 'Project Structure', link: '/guide/project-structure' },
{ text: 'Config Template', link: '/guide/nginx-ui-template' },

View file

@ -29,6 +29,7 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
text: '开发',
collapsed: false,
items: [
{ text: '开发容器', link: '/zh_CN/guide/devcontainer' },
{ text: '构建', link: '/zh_CN/guide/build' },
{ text: '项目结构', link: '/zh_CN/guide/project-structure' },
{ text: '配置模板', link: '/zh_CN/guide/nginx-ui-template' },

View file

@ -29,6 +29,7 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
text: '開發',
collapsed: false,
items: [
{ text: '開發容器', link: '/zh_TW/guide/devcontainer' },
{ text: '構建', link: '/zh_TW/guide/build' },
{ text: '專案結構', link: '/zh_TW/guide/project-structure' },
{ text: '配置模板', link: '/zh_TW/guide/nginx-ui-template' },

View file

@ -0,0 +1,50 @@
# Devcontainer
You'll need to set up a development environment if you want to develop on this project.
## Prerequisites
- Docker
- VSCode (Cursor)
- Git
## Setup
1. Open the Command Palette in VSCode (Cursor)
- Mac: `Cmd`+`Shift`+`P`
- Windows: `Ctrl`+`Shift`+`P`
2. Search for `Dev Containers: Rebuild and Reopen in Container` and click on it
3. Wait for the container to start
4. Open the Command Palette in VSCode (Cursor)
- Mac: `Cmd`+`Shift`+`P`
- Windows: `Ctrl`+`Shift`+`P`
5. Select Tasks: Run Task -> Start all services
6. Wait for the services to start
## Ports
| Port | Service |
|-------|------------------|
| 3002 | App |
| 3003 | Documentation |
| 9000 | API Backend |
## Services
- nginx-ui
- nginx-ui-2
- casdoor
- chaltestsrv
- pebble
## Multi-node development
Add the following enviroment in the main node:
```
name: nginx-ui-2
url: http://nginx-ui-2
token: nginx-ui-2
```

View file

@ -0,0 +1,48 @@
# 开发容器
如果您想参与本项目开发,需要设置开发环境。
## 前提条件
- Docker
- VSCode (Cursor)
- Git
## 设置步骤
1. 在 VSCode (Cursor) 中打开命令面板
- Mac: `Cmd`+`Shift`+`P`
- Windows: `Ctrl`+`Shift`+`P`
2. 搜索 `Dev Containers: 重新生成并重新打开容器` 并点击
3. 等待容器启动
4. 再次打开命令面板
- Mac: `Cmd`+`Shift`+`P`
- Windows: `Ctrl`+`Shift`+`P`
5. 选择 任务: 运行任务 -> 启动所有服务
6. 等待所有服务启动完成
## 端口映射
| 端口 | 服务 |
|-------|-------------------|
| 3002 | 主应用 |
| 3003 | 文档 |
| 9000 | API 后端 |
## 服务列表
- nginx-ui
- nginx-ui-2
- casdoor
- chaltestsrv
- pebble
## 多节点开发
在主节点中添加以下环境配置:
```
name: nginx-ui-2
url: http://nginx-ui-2
token: nginx-ui-2
```

View file

@ -0,0 +1,48 @@
# 開發容器
如果您想參與本專案開發,需要設定開發環境。
## 必要條件
- Docker
- VSCode (Cursor)
- Git
## 設定步驟
1. 在 VSCode (Cursor) 中開啟指令面板
- Mac: `Cmd`+`Shift`+`P`
- Windows: `Ctrl`+`Shift`+`P`
2. 搜尋 `Dev Containers: 重新產生並重新開啟容器` 並點擊
3. 等待容器啟動
4. 再次開啟指令面板
- Mac: `Cmd`+`Shift`+`P`
- Windows: `Ctrl`+`Shift`+`P`
5. 選擇 任務: 執行任務 -> 啟動所有服務
6. 等待所有服務啟動完成
## 連接埠映射
| 連接埠 | 服務 |
|-------|-------------------|
| 3002 | 主應用 |
| 3003 | 文件 |
| 9000 | API 後端 |
## 服務清單
- nginx-ui
- nginx-ui-2
- casdoor
- chaltestsrv
- pebble
## 多節點開發
在主節點中新增以下環境設定:
```
name: nginx-ui-2
url: http://nginx-ui-2
token: nginx-ui-2
```