xt12321
关注
104567 号成员,2023-04-25 08:58:07 加入
90
个人主页 浏览
1h2m
在线时长
  • 群晖 Docker 部署 思源笔记

    2023-05-05 09:31

    参考 github 上的一个 issue 以及代码,修改为下面这样配置 docker-compose.yml 文件可以 (本地 ubuntu 上 docker-compose 成功运行):

    version: '3'
    services:
      siyuan:
        image: b3log/siyuan
        container_name: siyuanNote
        restart: always
        ports: 
          - 6806:6806
        command: [--accessAuthCode=123456,--lang=zh_CN]
        volumes:
          - siyuan:/siyuan/workspace
        user: 1000:1000
    volumes:
      siyuan:
    
    

    项目代码中,参数配置在 kernel/util/working.go 文件,第 62 - 69 行, 代码如下:

    	workspacePath := flag.String("workspace", "", "dir path of the workspace, default to ~/Documents/SiYuan/")
    	wdPath := flag.String("wd", WorkingDir, "working directory of SiYuan")
    	port := flag.String("port", "0", "port of the HTTP server")
    	readOnly := flag.String("readonly", "false", "read-only mode")
    	accessAuthCode := flag.String("accessAuthCode", "", "access auth code")
    	ssl := flag.Bool("ssl", false, "for https and wss")
    	lang := flag.String("lang", "", "zh_CN/zh_CHT/en_US/fr_FR/es_ES")
    	mode := flag.String("mode", "prod", "dev/prod")
    

    image.png

  • 群晖 Docker 部署 思源笔记

    2023-05-04 16:11

    昨天部署的时候,没有注意授权码的问题。不过,刚 windows 上试了一下 docker-compose 部署,但是访问网页,并没有让输入授权码,不知道你那边部署完之后是否成功了?