Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

Docker compose example (#9679)

Kieran Wynne007ed6c4e621
diff --git a/README.md b/README.md
index 6b89e41f0d..149445b166 100644
--- a/README.md
+++ b/README.md
@@ -149,6 +149,24 @@ To simplify, it is recommended to configure the workspace folder path to be cons
docker run -d -v /siyuan/workspace:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=xxx
```
+Alternatively, see below for an example docker-compose file:
+```
+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}
+```
+
#### 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.