Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
donknap committed Dec 30, 2024
1 parent 6d1eb2c commit cb27a01
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions docs/zh-cn/install/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ dpanel 面板允许不依赖容器,直接通过二进制包的方式运行。

- dpanel.exe

### 更改权限

```
chmod 755 dpanel
```


### 编译 DPanel 源码

Expand Down Expand Up @@ -61,30 +67,39 @@ docker run -it --rm --name dpanel-compile golang:latest go version

#### 编译源码

###### 下载源码并切至源码目录
- 请确保已经正确安装 libc,并将 CC CXX 配置到环境变量中
- alpine 系统需要安装 musl
- windows 系统需要安装 [MinGW](https://winlibs.com/#download-release)
- 编译时将 1.5.0 替换成当时的程序版本号

##### 下载源码并切至源码目录

```
git clone https://github.com/donknap/dpanel.git
cd dpanel
```

###### make

> 请确保已经正确安装 libc,alpine 系统需要安装 musl
##### 使用 make 命令编译

```
make build PROJECT_NAME=dpanel CGO_ENABLED=1 VERSION=1.5.0
```

###### windows
##### 使用 go build 编译

> 需要安装 MinGW https://winlibs.com/#download-release 并配置到环境变量中
###### windows

```
set CGO_ENABLED=1
go build -ldflags '-X main.DPanelVersion=1.5.0 -s -w' -o runtime/dpanel.exe
```

###### linux

```
CGO_ENABLED=1 go build -ldflags '-X main.DPanelVersion=1.5.0 -s -w' -o runtime/dpanel
```

### 启动

> 运行相关配置可直接修改 config.yaml 中
Expand All @@ -94,11 +109,6 @@ go build -ldflags '-X main.DPanelVersion=1.5.0 -s -w' -o runtime/dpanel.exe
./runtime/dpanel server:start -f config.yaml
```

```
// 修改运行端口为 8807,其它环境变量可查看 config.yaml
export APP_SERVER_PORT=8807 && ./runtime/dpanel server:start -f config.yaml
```

### 当前环境未安装 docker

独立运行 DPanel 时,会自动连接当前默认的的 Docker Engine 接口。
Expand Down

0 comments on commit cb27a01

Please sign in to comment.