🎨 桌面端内核进程使用随机端口 https://github.com/siyuan-note/siyuan/issues/4952

This commit is contained in:
Liang Ding 2022-10-25 12:03:14 +08:00
parent efb6a2801d
commit 13602b8aed
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -78,15 +78,15 @@ func Boot() {
Mode = *mode Mode = *mode
Resident, _ = strconv.ParseBool(*resident) Resident, _ = strconv.ParseBool(*resident)
ServerPort = *port ServerPort = *port
if isRunningInDockerContainer() || "dev" == Mode {
ServerPort = FixedPort
}
ReadOnly, _ = strconv.ParseBool(*readOnly) ReadOnly, _ = strconv.ParseBool(*readOnly)
AccessAuthCode = *accessAuthCode AccessAuthCode = *accessAuthCode
Container = ContainerStd Container = ContainerStd
if isRunningInDockerContainer() { if isRunningInDockerContainer() {
Container = ContainerDocker Container = ContainerDocker
} }
if ContainerStd != Container || "dev" == Mode {
ServerPort = FixedPort
}
msStoreFilePath := filepath.Join(WorkingDir, "ms-store") msStoreFilePath := filepath.Join(WorkingDir, "ms-store")
ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath) ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath)