{"id":423615,"date":"2024-12-03T21:21:20","date_gmt":"2024-12-03T13:21:20","guid":{"rendered":"https:\/\/www.idc.net\/help\/423615\/"},"modified":"2024-12-03T21:21:21","modified_gmt":"2024-12-03T13:21:21","slug":"%e4%bd%bf%e7%94%a8docker%e5%ae%89%e8%a3%85mattermost%e7%9a%84%e6%95%99%e7%a8%8b-2","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/423615\/","title":{"rendered":"\u4f7f\u7528Docker\u5b89\u88c5Mattermost\u7684\u6559\u7a0b"},"content":{"rendered":"<h1 id=\"%e4%bd%bf%e7%94%a8docker%e5%ae%89%e8%a3%85mattermost%e7%9a%84%e6%95%99%e7%a8%8b-hucnALthsH\">\u4f7f\u7528Docker\u5b89\u88c5Mattermost\u7684\u6559\u7a0b<\/h1>\n<p>Mattermost\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u56e2\u961f\u534f\u4f5c\u5de5\u5177\uff0c\u63d0\u4f9b\u5373\u65f6\u6d88\u606f\u3001\u6587\u4ef6\u5171\u4eab\u548c\u9879\u76ee\u7ba1\u7406\u7b49\u529f\u80fd\u3002\u5b83\u7684\u7075\u6d3b\u6027\u548c\u53ef\u6269\u5c55\u6027\u4f7f\u5176\u6210\u4e3a\u8bb8\u591a\u4f01\u4e1a\u548c\u56e2\u961f\u7684\u9996\u9009\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Docker\u6765\u5b89\u88c5Mattermost\uff0c\u4ee5\u4fbf\u5feb\u901f\u642d\u5efa\u4e00\u4e2a\u9ad8\u6548\u7684\u56e2\u961f\u6c9f\u901a\u5e73\u53f0\u3002<\/p>\n<h2 id=\"%e5%89%8d%e6%9c%9f%e5%87%86%e5%a4%87-hucnALthsH\">\u524d\u671f\u51c6\u5907<\/h2>\n<p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Docker\u548cDocker Compose\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5Docker\u662f\u5426\u5df2\u5b89\u88c5\uff1a<\/p>\n<pre><code>docker --version<\/code><\/pre>\n<p>\u5982\u679c\u672a\u5b89\u88c5Docker\uff0c\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fddDocker\u670d\u52a1\u6b63\u5728\u8fd0\u884c\u3002<\/p>\n<h2 id=\"%e5%88%9b%e5%bb%bamattermost%e7%9a%84docker-compose%e6%96%87%e4%bb%b6-hucnALthsH\">\u521b\u5efaMattermost\u7684Docker Compose\u6587\u4ef6<\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aDocker Compose\u6587\u4ef6\u6765\u5b9a\u4e49Mattermost\u7684\u670d\u52a1\u3002\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>docker-compose.yml<\/code>\u7684\u6587\u4ef6\uff0c\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre><code>version: '3'\n\nservices:\n  db:\n    image: postgres:13\n    environment:\n      POSTGRES_USER: mattermost\n      POSTGRES_PASSWORD: password\n      POSTGRES_DB: mattermost\n    volumes:\n      - db_data:\/var\/lib\/postgresql\/data\n\n  app:\n    image: mattermost\/mattermost-team-edition:latest\n    environment:\n      MM_DB_DRIVER: postgres\n      MM_DB_SOURCE: postgres:\/\/mattermost:password@db:5432\/mattermost?sslmode=disable\n      MM_SERVICESETTINGS_SITEURL: http:\/\/localhost:8065\n    ports:\n      - \"8065:8065\"\n    depends_on:\n      - db\n    volumes:\n      - app_data:\/mattermost\/data\n\nvolumes:\n  db_data:\n  app_data:<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e24\u4e2a\u670d\u52a1\uff1a\u4e00\u4e2a\u662fPostgreSQL\u6570\u636e\u5e93\uff0c\u53e6\u4e00\u4e2a\u662fMattermost\u5e94\u7528\u3002\u6211\u4eec\u8fd8\u8bbe\u7f6e\u4e86\u6570\u636e\u5e93\u7684\u7528\u6237\u540d\u3001\u5bc6\u7801\u548c\u6570\u636e\u5e93\u540d\u79f0\u3002<\/p>\n<h2 id=\"%e5%90%af%e5%8a%a8mattermost-hucnALthsH\">\u542f\u52a8Mattermost<\/h2>\n<p>\u5728\u7ec8\u7aef\u4e2d\uff0c\u5bfc\u822a\u5230\u5305\u542b<code>docker-compose.yml<\/code>\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8Mattermost\uff1a<\/p>\n<pre><code>docker-compose up -d<\/code><\/pre>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5728\u540e\u53f0\u542f\u52a8Mattermost\u548c\u6570\u636e\u5e93\u670d\u52a1\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>docker-compose ps<\/code>\u547d\u4ee4\u6765\u67e5\u770b\u670d\u52a1\u7684\u72b6\u6001\u3002<\/p>\n<h2 id=\"%e8%ae%bf%e9%97%aemattermost-hucnALthsH\">\u8bbf\u95eeMattermost<\/h2>\n<p>Mattermost\u9ed8\u8ba4\u8fd0\u884c\u57288065\u7aef\u53e3\u3002\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee<code>http:\/\/localhost:8065<\/code>\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u770b\u5230Mattermost\u7684\u6b22\u8fce\u9875\u9762\u3002\u63a5\u4e0b\u6765\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u63d0\u793a\u521b\u5efa\u4e00\u4e2a\u7ba1\u7406\u5458\u8d26\u6237\uff0c\u5e76\u5f00\u59cb\u4f7f\u7528Mattermost\u8fdb\u884c\u56e2\u961f\u534f\u4f5c\u3002<\/p>\n<h2 id=\"%e6%95%b0%e6%8d%ae%e6%8c%81%e4%b9%85%e5%8c%96-hucnALthsH\">\u6570\u636e\u6301\u4e45\u5316<\/h2>\n<p>\u5728\u4e0a\u8ff0\u914d\u7f6e\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86Docker\u5377\u6765\u6301\u4e45\u5316\u6570\u636e\u5e93\u548cMattermost\u7684\u6570\u636e\u3002\u8fd9\u610f\u5473\u7740\u5373\u4f7f\u4f60\u505c\u6b62\u6216\u5220\u9664\u5bb9\u5668\uff0c\u6570\u636e\u4ecd\u7136\u4f1a\u4fdd\u7559\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5377\u7684\u72b6\u6001\uff1a<\/p>\n<pre><code>docker volume ls<\/code><\/pre>\n<h2 id=\"%e6%80%bb%e7%bb%93-hucnALthsH\">\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4f7f\u7528Docker\u5b89\u88c5Mattermost\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u642d\u5efa\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u56e2\u961f\u534f\u4f5c\u5e73\u53f0\u3002Docker\u7684\u5bb9\u5668\u5316\u6280\u672f\u4f7f\u5f97\u90e8\u7f72\u548c\u7ba1\u7406\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u548c\u9ad8\u6548\u3002\u5982\u679c\u4f60\u9700\u8981\u66f4\u7a33\u5b9a\u7684\u73af\u5883\u6765\u8fd0\u884cMattermost\uff0c\u8003\u8651\u4f7f\u7528\u540e\u6d6a\u4e91\u63d0\u4f9b\u7684<a href=\"https:\/\/idc.net\">\u4e91\u670d\u52a1\u5668<\/a>\u6216<a href=\"https:\/\/idc.net\">VPS<\/a>\u89e3\u51b3\u65b9\u6848\uff0c\u4ee5\u786e\u4fdd\u4f60\u7684\u5e94\u7528\u80fd\u591f\u9ad8\u6548\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b66\u4e60\u5982\u4f55\u4f7f\u7528Docker\u5feb\u901f\u5b89\u88c5Mattermost\uff0c\u8f7b\u677e\u642d\u5efa\u56e2\u961f\u534f\u4f5c\u5e73\u53f0\uff0c\u63d0\u5347\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[202757],"tags":[],"class_list":["post-423615","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/423615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=423615"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/423615\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=423615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=423615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=423615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}