🎨 Improve auth failed tip for browser access on non 127.0.0.1 https://github.com/siyuan-note/siyuan/issues/9224

This commit is contained in:
Daniel 2023-09-20 10:57:12 +08:00
parent f98be60aa5
commit f6f21bbd08
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 22 additions and 4 deletions

View file

@ -130,12 +130,21 @@ The entry point is set when building the Docker image: `ENTRYPOINT ["/opt/siyuan
* `--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`
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 --accessAuthCode=xxx
```
* `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`
* `accessAuthCode`: Access authorization code, please **be sure to modify**, otherwise anyone can read and write your data
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/`.
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/ --accessAuthCode=xxx
```
#### User permissions

View file

@ -133,12 +133,21 @@
* `--workspace` 指定工作空间文件夹路径,在宿主机上通过 `-v` 挂载到容器中
更多的参数可参考 `--help`。下面是一条启动命令示例:`docker run -v workspace_dir_host:workspace_dir_container -p 6806:6806 b3log/siyuan --workspace=workspace_dir_container`
更多的参数可参考 `--help`。下面是一条启动命令示例:
```
docker run -v workspace_dir_host:workspace_dir_container -p 6806:6806 b3log/siyuan --workspace=workspace_dir_container --accessAuthCode=xxx
```
* `workspace_dir_host`:宿主机上的工作空间文件夹路径
* `workspace_dir_container`:容器内工作空间文件夹路径,和后面 `--workspace` 指定成一样的
* `accessAuthCode`:访问授权码,请**务必修改**,否则任何人都可以读写你的数据
为了简化,建议将 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/`
为了简化,建议将 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/ --accessAuthCode=xxx
```
#### 用户权限