思源笔记搭建过程中出现了一些问题

version: "3.9"
services:
  main:
    image: b3log/siyuan
    command: ['--workspace=/siyuan/workspace/', '--accessAuthCode=${AuthCode}']
    user: '1000:1000'
    ports:
      - 6806:6806
    volumes:
      - /siyuan/workspace:/siyuan/workspace
    restart: unless-stopped
    environment:
      # A list of time zone identifiers can be found at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      - TZ=${TimeZone}

在这个里面,就算按照教程来,但是一直显示文件夹路径不合法,改了权限和都没什么用,最后好像说是是思源笔记的路径本来就有点问题,所以直接把数据库的卷挂载在自己想存储的目录

version: "3.9"
services:
  main:
    image: b3log/siyuan  # 使用的镜像源名称
    container_name: SiYuan  # 设置容器名称
    command: [
        "--workspace=/home/user/SiYuan/workspace/",
        "--accessAuthCode=xxxx!" # 官方设置的容器内的数据存放路径与认证码
    ]
    user: '1000:1000'
    volumes:
      - "/home/user/SiYuan/workspace:/home/siyuan"
    network_mode: "host"
    ports:
      - "6806:6806"
    restart: always  # 容器自动重启
    environment:
      - LANG=zh_CN
最后修改:2024 年 08 月 02 日
如果觉得我的文章对你有用,请随意赞赏