📝 Update setup
This commit is contained in:
parent
0736af5928
commit
d12406878c
2 changed files with 114 additions and 5 deletions
59
README.md
59
README.md
|
@ -83,13 +83,68 @@ Cloud services require a paid subscription.
|
|||
|
||||
## 🛠️ Download Setup
|
||||
|
||||
* [B3log](https://b3log.org/siyuan/en/download.html)
|
||||
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
|
||||
It is recommended to give priority to installing through the application market on the desktop and mobile, so that you can upgrade the version with one click in the future.
|
||||
|
||||
### App Market
|
||||
|
||||
* [Docker](https://hub.docker.com/r/b3log/siyuan)
|
||||
* [App Store](https://apps.apple.com/us/app/siyuan/id1583226508)
|
||||
* [Google Play](https://play.google.com/store/apps/details?id=org.b3log.siyuan)
|
||||
* [Microsoft Store](https://www.microsoft.com/store/apps/9P7HPMXP73K4)
|
||||
|
||||
### Docker Hosting
|
||||
|
||||
<details>
|
||||
<summary>Docker Deployment</summary>
|
||||
|
||||
#### Overview
|
||||
|
||||
The easiest way to serve SiYuan on a server is to deploy it through Docker.
|
||||
|
||||
* Image name `b3log/siyuan`
|
||||
* [Image URL](https://hub.docker.com/r/b3log/siyuan)
|
||||
|
||||
#### File structure
|
||||
|
||||
The overall program is located under `/opt/siyuan/`, which is basically the structure under the resources folder of the Electron installation package:
|
||||
|
||||
* appearance: icon, theme, languages
|
||||
* guide: user guide document
|
||||
* stage: interface and static resources
|
||||
* kernel: kernel program
|
||||
|
||||
#### Entrypoint
|
||||
|
||||
The entry point is set when building the Docker image: `ENTRYPOINT ["/opt/siyuan/kernel" ]`, use `docker run b3log/siyuan` with parameters to start:
|
||||
|
||||
* `--workspace` specifies the workspace folder path, mounted to the container via `-v` on the host
|
||||
|
||||
More parameters can refer to `--help`. The following is an example of a startup command: `docker run -v workspace_dir_host:workspace_dir_container -p 6806:6806 b3log/siyuan --workspace=workspace_dir_container`
|
||||
|
||||
* `workspace_dir_host`: the workspace folder path on the host
|
||||
* `workspace_dir_container`: The path of the workspace folder in the container, which is the same as specified in `--workspace`
|
||||
|
||||
To simplify, it is recommended to configure the workspace folder path to be consistent on the host and container, such as: `workspace_dir_host` and `workspace_dir_container` are configured as `/siyuan/workspace`, the corresponding startup commands is: `docker run -v /siyuan/workspace:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/`.
|
||||
|
||||
## User permissions
|
||||
|
||||
In the image, the normal user `siyuan` (uid 1000/gid 1000) created by default is used to start the kernel process. Therefore, when the host creates a workspace folder, please pay attention to setting the user group of the folder: `chown - R 1000:1000 /siyuan/workspace`. The parameter `-u 1000:1000` is required when starting the container.
|
||||
|
||||
## Hidden port
|
||||
|
||||
Use NGINX reverse proxy to hide port 6806, please note:
|
||||
|
||||
* Configure WebSocket reverse proxy `/ws`
|
||||
|
||||
</details>
|
||||
|
||||
### Installation Package
|
||||
|
||||
* [B3log](https://b3log.org/siyuan/en/download.html)
|
||||
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
|
||||
|
||||
### Insider Preview
|
||||
|
||||
To get the latest Insider Preview, please send an email with your GitHub login name to 845765@qq.com, and we will invite you to join the SiYuan Insider Preview team, thanks.
|
||||
|
||||
## 🏘️ Community
|
||||
|
|
|
@ -86,9 +86,10 @@
|
|||
|
||||
## 🛠️ 下载安装
|
||||
|
||||
* [B3log](https://b3log.org/siyuan/download.html)
|
||||
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
|
||||
* [Docker](https://hub.docker.com/r/b3log/siyuan)
|
||||
桌面端和移动端建议优先考虑通过应用市场安装,这样以后升级版本时可以一键更新。
|
||||
|
||||
### 应用市场
|
||||
|
||||
* [App Store](https://apps.apple.com/cn/app/siyuan/id1583226508)
|
||||
* [Google Play](https://play.google.com/store/apps/details?id=org.b3log.siyuan)
|
||||
* [Microsoft Store](https://www.microsoft.com/store/apps/9P7HPMXP73K4)
|
||||
|
@ -96,6 +97,59 @@
|
|||
* [小米应用商店](https://app.mi.com/details?id=org.b3log.siyuan)
|
||||
* [酷安](https://www.coolapk.com/apk/292664)
|
||||
|
||||
### Docker 部署
|
||||
|
||||
<details>
|
||||
<summary>Docker 部署文档</summary>
|
||||
|
||||
#### 概述
|
||||
|
||||
在服务器上伺服思源最简单的方案是通过 Docker 部署。
|
||||
|
||||
* 镜像名称 `b3log/siyuan`
|
||||
* [镜像地址](https://hub.docker.com/r/b3log/siyuan)
|
||||
|
||||
#### 文件结构
|
||||
|
||||
整体程序位于 `/opt/siyuan/` 下,基本上就是 Electron 安装包 resources 文件夹下的结构:
|
||||
|
||||
* appearance:图标、主题、多语言
|
||||
* guide:帮助文档
|
||||
* stage:界面和静态资源
|
||||
* kernel:内核程序
|
||||
|
||||
#### 启动入口
|
||||
|
||||
构建 Docker 镜像时设置了入口:`ENTRYPOINT [ "/opt/siyuan/kernel" ]`,使用 `docker run b3log/siyuan` 并带参即可启动:
|
||||
|
||||
* `--workspace` 指定工作空间文件夹路径,在宿主机上通过 `-v` 挂载到容器中
|
||||
|
||||
更多的参数可参考 `--help`。下面是一条启动命令示例:`docker run -v workspace_dir_host:workspace_dir_container -p 6806:6806 b3log/siyuan --workspace=workspace_dir_container`
|
||||
|
||||
* `workspace_dir_host`:宿主机上的工作空间文件夹路径
|
||||
* `workspace_dir_container`:容器内工作空间文件夹路径,和后面 `--workspace` 指定成一样的
|
||||
|
||||
为了简化,建议将 workspace 文件夹路径在宿主机和容器上配置为一致的,比如将 `workspace_dir_host` 和 `workspace_dir_container` 都配置为 `/siyuan/workspace`,对应的启动命令示例:`docker run -v /siyuan/workspace:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/`。
|
||||
|
||||
#### 用户权限
|
||||
|
||||
镜像中是使用默认创建的普通用户 `siyuan`(uid 1000/gid 1000)来启动内核进程的,所以在宿主机创建工作空间文件夹时请注意设置该文件夹所属用户组:`chown -R 1000:1000 /siyuan/workspace`,在启动容器时需要带参数 `-u 1000:1000`。
|
||||
|
||||
#### 隐藏端口
|
||||
|
||||
使用 NGINX 反向代理可以隐藏 6806 端口,请注意:
|
||||
|
||||
* 配置 WebSocket 反代 `/ws`
|
||||
|
||||
</details>
|
||||
|
||||
### 安装包
|
||||
|
||||
* [B3log](https://b3log.org/siyuan/download.html)
|
||||
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
|
||||
|
||||
### 内部预览版
|
||||
|
||||
获取最新内部预览版(Insider Preview),请将你的 GitHub 登录名发送邮件至 845765@qq.com,我们将邀请你加入 SiYuan 内部预览团队。
|
||||
|
||||
## 🏘️ 社区
|
||||
|
|
Loading…
Add table
Reference in a new issue