{"id":244554,"date":"2022-06-22T08:36:40","date_gmt":"2022-06-22T00:36:40","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=244554"},"modified":"2022-06-04T22:37:07","modified_gmt":"2022-06-04T14:37:07","slug":"docker-deploy-seafile","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/docker-deploy-seafile.html","title":{"rendered":"\u600e\u6837\u7528 Docker \u90e8\u7f72 Seafile \u670d\u52a1\u5668\u6765\u6258\u7ba1\u4f60\u81ea\u5df1\u7684\u6587\u4ef6\u540c\u6b65\u548c\u5171\u4eab\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nSeafile<\/a>[1]<\/span>\u00a0\u662f\u4e00\u4e2a\u81ea\u6258\u7ba1\u6587\u4ef6\u540c\u6b65\u7a0b\u5e8f\uff0c\u91c7\u7528\u5ba2\u6237\u7aef\/\u670d\u52a1\u5668\u6a21\u5f0f\uff0c\u5373\u4f60\u6709\u7b14\u8bb0\u672c\u3001\u624b\u673a\u7b49\u591a\u4e2a\u8bbe\u5907\uff0c\u80fd\u591f\u8fde\u63a5\u5230\u4e00\u4e2a\u4e2d\u5fc3\u670d\u52a1\u5668\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u4e0d\u50cf\u7c7b\u4f3c\u00a0Nextcloud \u6216 ownCloud<\/a>[2]<\/span>\u00a0\u8fd9\u4e9b\u66f4\u6d41\u884c\u7684\u66ff\u4ee3\u54c1\u4e00\u6837\uff0cSeafile \u8bd5\u56fe\u9075\u5faa \u201c\u53ea\u505a\u4e00\u4ef6\u4e8b\uff0c\u4f46\u662f\u8981\u505a\u597d\u201d \u7684\u7406\u5ff5\u3002\u540c\u6837\uff0cSeafile \u6ca1\u6709\u5185\u7f6e\u989d\u5916\u7684\u7c7b\u4f3c\u8054\u7cfb\u4eba\u6216\u8005\u65e5\u5386\u805a\u5408\u7684\u529f\u80fd\u3002<\/p>\n

\u76f8\u53cd\uff0cSeafile \u53ea\u4e13\u6ce8\u4e8e\u6587\u4ef6\u540c\u6b65\u3001\u5171\u4eab\u53ca\u4e0e\u4e4b\u76f8\u5173\u7684\u4e8b\u60c5\uff0c\u4ec5\u6b64\u800c\u5df2\u3002\u4f46\u6b63\u56e0\u4e3a\u5982\u6b64\uff0c\u5b83\u6700\u7ec8\u505a\u7684\u975e\u5e38\u597d\u3002<\/p>\n

\u4f7f\u7528 Docker \u548c NGINX \u90e8\u7f72 Seafile \u670d\u52a1\u5668<\/strong><\/div>\n

\u9ad8\u7ea7\u6559\u7a0b<\/strong><\/p>\n

\u6211\u4eec\u7684\u8bb8\u591a\u6559\u7a0b\u90fd\u662f\u9488\u5bf9\u521d\u5b66\u8005\u7684\u3002\u8fd9\u7bc7\u5219\u4e0d\u7136\uff0c\u5b83\u662f\u4e3a\u90a3\u4e9b\u7ecf\u5e38\u9f13\u6363 DIY \u9879\u76ee\u548c\u559c\u6b22\u81ea\u6258\u7ba1\u7684\u9ad8\u7ea7\u7528\u6237\u8bbe\u8ba1\u7684\u3002\u8fd9\u4e2a\u6559\u7a0b\u5047\u5b9a\u4f60\u53ef\u4ee5\u719f\u7ec3\u7684\u4f7f\u7528\u547d\u4ee4\u884c\uff0c\u800c\u4e14\u4f60\u81f3\u5c11\u5bf9\u6211\u4eec\u5c06\u8981\u4f7f\u7528\u7684\u7a0b\u5e8f\u6709\u4e00\u5b9a\u7684\u4e86\u89e3\u3002<\/p><\/blockquote>\n

\u867d\u7136\u6574\u4e2a\u8fc7\u7a0b\u5b8c\u5168\u53ef\u4ee5\u4e0d\u4f7f\u7528 NGINX \uff0c\u4f46\u662f\u4f7f\u7528 NGINX \u66f4\u52a0\u5bb9\u6613\u914d\u7f6e\uff0c\u800c\u4e14\u5728\u5c06\u6765\u66f4\u52a0\u5bb9\u6613\u7684\u81ea\u6258\u7ba1\u66f4\u591a\u7684\u670d\u52a1\u3002<\/p>\n

\u5982\u679c\u4f60\u60f3\u5b8c\u5168\u4f7f\u7528 Docker \u73af\u5883\uff0c\u4f60\u4e5f\u53ef\u4ee5\u00a0\u5728 Docker \u5185\u90e8\u8bbe\u7f6e NGINX<\/a>[3]<\/span>\u00a0\uff0c\u4f46\u662f\u5b83\u8fd9\u4f1a\u4f7f\u4e8b\u60c5\u53d8\u5f97\u66f4\u52a0\u590d\u6742\uff0c\u5e76\u4e14\u4e0d\u80fd\u591f\u5e26\u6765\u592a\u591a\u597d\u5904\u3002\u540c\u6837\uff0c\u5728\u672c\u6559\u7a0b\u91cc\u4e5f\u4e0d\u4f1a\u6d89\u53ca\u8fd9\u4e9b\u3002<\/p>\n

\u5b89\u88c5\u8bbe\u7f6e\u3000NGINX<\/strong><\/span><\/div>\n

\u5728\u8fd9\u4e2a\u6559\u7a0b\u4e2d\uff0c\u6211\u4f1a\u4f7f\u7528 Ubuntu\uff0c\u56e0\u6b64\u4f1a\u4f7f\u7528\u00a0apt<\/code>\u00a0\u6765\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002\u5982\u679c\u4f60\u4f7f\u7528 Fedora \u6216\u8005\u4e00\u4e9b\u5176\u4ed6\u975e Debian \u53d1\u884c\u7248\uff0c\u8bf7\u4f7f\u7528\u4f60\u7684\u53d1\u884c\u7248\u7684\u00a0\u5305\u7ba1\u7406\u5668<\/a>[4]<\/span>\u3002<\/p>\n

NGINX<\/a>[5]<\/span>\u00a0\u65e2\u662f\u4e00\u4e2a\u7f51\u9875\u6d4f\u89c8\u5668\uff0c\u53c8\u662f\u4e00\u4e2a\u4ee3\u7406\u670d\u52a1\u5668\u3002\u5b83\u5c06\u8d77\u5230 Seafile \u670d\u52a1\u5668\u548c\u4e92\u8054\u7f51\u4e4b\u95f4\u7f51\u7edc\u8fde\u63a5\u7684\u4f5c\u7528\uff0c\u540c\u65f6\u4e5f\u4f7f\u4e00\u4e9b\u4efb\u52a1\u66f4\u5bb9\u6613\u5904\u7406\u3002<\/p>\n

\u8981\u5b89\u88c5 NGINX \uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

sudo apt install nginx\r\n<\/code><\/pre>\n

\u5982\u679c\u4f60\u60f3\u4f7f\u7528 HTTPS\uff08\u4e5f\u5c31\u662f\u6d4f\u89c8\u5668\u4e2d\u7684\u5c0f\u6302\u9501\uff09\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u00a0Certbot<\/a>[6]<\/span>\uff1a<\/p>\n

sudo apt install certbot python3-certbot-nginx\r\n<\/code><\/pre>\n

\u4e0b\u4e00\u6b65\uff0c\u4f60\u9700\u8981\u8bbe\u7f6e NGINX \u6765\u8fde\u63a5\u6211\u4eec\u4e4b\u540e\u5c06\u8981\u8bbe\u7f6e\u7684 Seafile \u5b9e\u4f8b\u3002<\/p>\n

\u9996\u5148\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

sudo nano \/etc\/nginx\/sites-available\/seafile.conf\r\n<\/code><\/pre>\n

\u952e\u5165\u4e0b\u65b9\u7684\u6587\u672c\u5230\u6587\u4ef6\u4e2d\uff1a<\/p>\n

server {\r\n  server_name localhost;\r\n  location \/ {\r\n    proxy_pass http:\/\/localhost:8080;\r\n    proxy_set_header Host $host;\r\n    proxy_set_header X-Real-IP $remote_addr;\r\n  }\r\n}\r\n<\/code><\/pre>\n

\u91cd\u8981<\/strong>: \u5c06\u00a0server_name<\/code>\u00a0\u4e00\u884c\u7684\u00a0localhost<\/code>\u00a0\u66ff\u6362\u4e3a\u4f60\u8981\u8bbf\u95ee\u4f60\u7684\u670d\u52a1\u5668\u7684\u5730\u5740\uff08\u6bd4\u5982\u00a0seafile.example.com<\/code>\u00a0\u6216\u8005\u00a0192.168.0.0<\/code>\uff09\u3002\u4e0d\u786e\u5b9a\u8981\u8f93\u5165\u4ec0\u4e48\u5417\uff1f<\/p>\n