{"id":293,"date":"2025-03-03T21:04:00","date_gmt":"2025-03-03T13:04:00","guid":{"rendered":"https:\/\/solost.cn\/?p=293"},"modified":"2025-03-03T21:39:25","modified_gmt":"2025-03-03T13:39:25","slug":"siyuan-zqh7np","status":"publish","type":"post","link":"https:\/\/solost.cn\/?p=293","title":{"rendered":"siyuan"},"content":{"rendered":"<h1>siyuan<\/h1>\n<pre><code class=\"lang-dockerfile\">version: &quot;3.9&quot;\nservices:\n  main:\n    image: b3log\/siyuan  # \u4f7f\u7528\u7684\u955c\u50cf\u6e90\u540d\u79f0\n    container_name: SiYuan  # \u8bbe\u7f6e\u5bb9\u5668\u540d\u79f0\n    command: [\n        &quot;--workspace=\/siyuan\/workspace\/&quot;,\n        &quot;--accessAuthCode=xxx&quot; # \u5b98\u65b9\u8bbe\u7f6e\u7684\u5bb9\u5668\u5185\u7684\u6570\u636e\u5b58\u653e\u8def\u5f84\u4e0e\u8ba4\u8bc1\u7801\n    ]\n    volumes:\n      - &quot;\/home\/solost\/docker\/siyuan\/workspace:\/siyuan\/workspace&quot;\n    network_mode: &quot;host&quot;\n    ports:\n      - &quot;6806:6806&quot;\n    restart: always  # \u5bb9\u5668\u81ea\u52a8\u91cd\u542f\n    environment:\n      - LANG=zh_CN\n      - PUID=1001\n      - PGID=1002<\/code><\/pre>\n<h4>\u7528\u6237\u6743\u9650<\/h4>\n<p>\u5728\u56fe\u7247\u4e2d\uff0c\u201centrypoint.sh \u201d\u811a\u672c\u786e\u4fdd\u4ee5\u6307\u5b9a\u7684 \u201cPUID \u201d\u548c \u201cPGID \u201d\u521b\u5efa \u201csiyuan \u201d\u7528\u6237\u548c\u7ec4\u3002\u56e0\u6b64\uff0c\u5f53\u4e3b\u673a\u521b\u5efa\u5de5\u4f5c\u533a\u6587\u4ef6\u5939\u65f6\uff0c\u8bf7\u6ce8\u610f\u8bbe\u7f6e\u6587\u4ef6\u5939\u7684\u7528\u6237\u548c\u7ec4\u6240\u6709\u6743\uff0c\u4f7f\u5176\u4e0e\u8ba1\u5212\u4f7f\u7528\u7684 <code>PUID<\/code>\u200b \u548c <code>PGID<\/code>\u200b \u5339\u914d\u3002\u4f8b\u5982<\/p>\n<pre><code class=\"lang-shell\">chown -R 1001:1002 \/siyuan\/workspace<\/code><\/pre>\n<p>\u5982\u679c\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684 <code>PUID<\/code>\u200b \u548c <code>PGID<\/code>\u200b \u503c\uff0c\u5165\u53e3\u70b9\u811a\u672c\u5c06\u786e\u4fdd\u5728\u5bb9\u5668\u5185\u521b\u5efa\u6b63\u786e\u7684\u7528\u6237\u548c\u7ec4\uff0c\u5e76\u76f8\u5e94\u8c03\u6574\u6302\u8f7d\u5377\u7684\u6240\u6709\u6743\u3002\u65e0\u9700\u5728 <code>docker run<\/code>\u200b \u6216 <code>docker-compose<\/code>\u200b \u4e2d\u624b\u52a8\u4f20\u9012 <code>-u<\/code>\u200b\uff0c\u56e0\u4e3a\u73af\u5883\u53d8\u91cf\u4f1a\u5904\u7406\u81ea\u5b9a\u4e49\u3002<\/p>\n<p>\u200d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>siyuan version: &quot;3.9&quot; services: main: image: b3log\/siyuan # \u4f7f\u7528\u7684\u955c\u50cf\u6e90\u540d\u79f0 container_name: SiYuan # \u8bbe\u7f6e\u5bb9\u5668\u540d\u79f0 command: [ &quot;--workspace=\/siyuan\/workspace\/&quot;, &quot;--accessAuthCode=xxx&quot; # \u5b98\u65b9\u8bbe\u7f6e\u7684\u5bb9\u5668\u5185\u7684\u6570\u636e\u5b58\u653e\u8def\u5f84\u4e0e\u8ba4\u8bc1\u7801 ] volumes: - &quot;\/home\/solost\/docker\/siyuan\/workspace:\/siyuan\/workspace&quot; network_mode: &quot;host&quot; ports: - &quot;6806:6806&quot; restart: always # \u5bb9\u5668\u81ea\u52a8\u91cd\u542f environment: - LANG=zh_CN - PUID=1001 - PGID=1002 \u7528\u6237\u6743\u9650 \u5728\u56fe\u7247\u4e2d\uff0c\u201centrypoint.sh \u201d\u811a\u672c\u786e\u4fdd\u4ee5\u6307\u5b9a\u7684 \u201cPUID \u201d\u548c \u201cPGID \u201d\u521b\u5efa \u201csiyuan \u201d\u7528\u6237\u548c\u7ec4\u3002\u56e0\u6b64\uff0c\u5f53\u4e3b\u673a\u521b\u5efa\u5de5\u4f5c\u533a\u6587\u4ef6\u5939\u65f6\uff0c\u8bf7\u6ce8\u610f\u8bbe\u7f6e\u6587\u4ef6\u5939\u7684\u7528\u6237\u548c\u7ec4\u6240\u6709\u6743\uff0c\u4f7f\u5176\u4e0e\u8ba1\u5212\u4f7f\u7528\u7684 PUID\u200b \u548c PGID\u200b \u5339\u914d\u3002\u4f8b\u5982 chown -R 1001:1002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293"}],"version-history":[{"count":0,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions"}],"wp:attachment":[{"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}