{"id":13822,"date":"2024-11-15T21:49:13","date_gmt":"2024-11-15T13:49:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/13822\/"},"modified":"2024-11-15T21:49:13","modified_gmt":"2024-11-15T13:49:13","slug":"%e4%bd%bf%e7%94%a8docker%e5%ae%89%e8%a3%85mattermost%e7%9a%84%e6%95%99%e7%a8%8b-3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/13822\/","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-qPEebOqUfn\">\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\u901a\u8fc7Docker\u5b89\u88c5Mattermost\uff0c\u53ef\u4ee5\u7b80\u5316\u90e8\u7f72\u8fc7\u7a0b\uff0c\u5e76\u786e\u4fdd\u73af\u5883\u7684\u4e00\u81f4\u6027\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Docker\u5728\u672c\u5730\u6216\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Mattermost\u3002<\/p>\n<h2 id=\"%e5%89%8d%e6%8f%90%e6%9d%a1%e4%bb%b6-qPEebOqUfn\">\u524d\u63d0\u6761\u4ef6<\/h2>\n<ul>\n<li>\u786e\u4fdd\u5df2\u5b89\u88c5Docker\u548cDocker Compose\u3002<\/li>\n<li>\u5177\u5907\u57fa\u672c\u7684\u547d\u4ee4\u884c\u64cd\u4f5c\u80fd\u529b\u3002<\/li>\n<li>\u6709\u4e00\u4e2a\u53ef\u7528\u7684\u6570\u636e\u5e93\uff08\u5982PostgreSQL\u6216MySQL\uff09\uff0c\u53ef\u4ee5\u9009\u62e9\u5728Docker\u4e2d\u8fd0\u884c\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%ad%a5%e9%aa%a4%e4%b8%80%ef%bc%9a%e6%8b%89%e5%8f%96mattermost%e9%95%9c%e5%83%8f-qPEebOqUfn\">\u6b65\u9aa4\u4e00\uff1a\u62c9\u53d6Mattermost\u955c\u50cf<\/h2>\n<p>\u9996\u5148\uff0c\u6253\u5f00\u7ec8\u7aef\u5e76\u62c9\u53d6Mattermost\u7684Docker\u955c\u50cf\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>docker pull mattermost\/mattermost-team-edition<\/code><\/pre>\n<h2 id=\"%e6%ad%a5%e9%aa%a4%e4%ba%8c%ef%bc%9a%e5%88%9b%e5%bb%badocker%e7%bd%91%e7%bb%9c-qPEebOqUfn\">\u6b65\u9aa4\u4e8c\uff1a\u521b\u5efaDocker\u7f51\u7edc<\/h2>\n<p>\u4e3a\u4e86\u8ba9Mattermost\u548c\u6570\u636e\u5e93\u80fd\u591f\u76f8\u4e92\u901a\u4fe1\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aDocker\u7f51\u7edc\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u7f51\u7edc\uff1a<\/p>\n<pre><code>docker network create mattermost-network<\/code><\/pre>\n<h2 id=\"%e6%ad%a5%e9%aa%a4%e4%b8%89%ef%bc%9a%e8%bf%90%e8%a1%8c%e6%95%b0%e6%8d%ae%e5%ba%93%e5%ae%b9%e5%99%a8-qPEebOqUfn\">\u6b65\u9aa4\u4e09\uff1a\u8fd0\u884c\u6570\u636e\u5e93\u5bb9\u5668<\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u8fd0\u884c\u4e00\u4e2a\u6570\u636e\u5e93\u5bb9\u5668\u3002\u8fd9\u91cc\u4ee5PostgreSQL\u4e3a\u4f8b\uff1a<\/p>\n<pre><code>docker run -d --name mattermost-db \n    --network mattermost-network \n    -e POSTGRES_USER=mmuser \n    -e POSTGRES_PASSWORD=mmuser_password \n    -e POSTGRES_DB=mattermost \n    postgres:latest<\/code><\/pre>\n<h2 id=\"%e6%ad%a5%e9%aa%a4%e5%9b%9b%ef%bc%9a%e8%bf%90%e8%a1%8cmattermost%e5%ae%b9%e5%99%a8-qPEebOqUfn\">\u6b65\u9aa4\u56db\uff1a\u8fd0\u884cMattermost\u5bb9\u5668<\/h2>\n<p>\u73b0\u5728\u53ef\u4ee5\u8fd0\u884cMattermost\u5bb9\u5668\u4e86\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>docker run -d --name mattermost-app \n    --network mattermost-network \n    -e MM_DB_DRIVER=postgres \n    -e MM_DB_HOST=mattermost-db:5432 \n    -e MM_DB_NAME=mattermost \n    -e MM_DB_USER=mmuser \n    -e MM_DB_PASSWORD=mmuser_password \n    -p 8065:8065 \n    mattermost\/mattermost-team-edition<\/code><\/pre>\n<h2 id=\"%e6%ad%a5%e9%aa%a4%e4%ba%94%ef%bc%9a%e8%ae%bf%e9%97%aemattermost-qPEebOqUfn\">\u6b65\u9aa4\u4e94\uff1a\u8bbf\u95eeMattermost<\/h2>\n<p>Mattermost\u5bb9\u5668\u542f\u52a8\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\uff1ahttp:\/\/localhost:8065\u3002\u9996\u6b21\u8bbf\u95ee\u65f6\uff0c\u60a8\u9700\u8981\u8bbe\u7f6e\u7ba1\u7406\u5458\u8d26\u6237\u548c\u56e2\u961f\u4fe1\u606f\u3002<\/p>\n<h2 id=\"%e6%ad%a5%e9%aa%a4%e5%85%ad%ef%bc%9a%e6%8c%81%e4%b9%85%e5%8c%96%e6%95%b0%e6%8d%ae-qPEebOqUfn\">\u6b65\u9aa4\u516d\uff1a\u6301\u4e45\u5316\u6570\u636e<\/h2>\n<p>\u4e3a\u4e86\u786e\u4fdd\u6570\u636e\u7684\u6301\u4e45\u6027\uff0c\u5efa\u8bae\u5c06\u6570\u636e\u5e93\u548cMattermost\u7684\u6570\u636e\u76ee\u5f55\u6302\u8f7d\u5230\u4e3b\u673a\u4e0a\u3002\u53ef\u4ee5\u5728\u8fd0\u884c\u5bb9\u5668\u65f6\u6dfb\u52a0-v\u53c2\u6570\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>docker run -d --name mattermost-db \n    --network mattermost-network \n    -v \/path\/to\/your\/data:\/var\/lib\/postgresql\/data \n    -e POSTGRES_USER=mmuser \n    -e POSTGRES_PASSWORD=mmuser_password \n    -e POSTGRES_DB=mattermost \n    postgres:latest<\/code><\/pre>\n<p>\u540c\u6837\uff0cMattermost\u7684\u6301\u4e45\u5316\u6570\u636e\u4e5f\u53ef\u4ee5\u901a\u8fc7\u7c7b\u4f3c\u7684\u65b9\u5f0f\u8fdb\u884c\u6302\u8f7d\u3002<\/p>\n<h2 id=\"%e6%80%bb%e7%bb%93-qPEebOqUfn\">\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5728Docker\u4e2d\u5b89\u88c5Mattermost\uff0c\u4eab\u53d7\u9ad8\u6548\u7684\u56e2\u961f\u534f\u4f5c\u4f53\u9a8c\u3002\u4f7f\u7528Docker\u7684\u597d\u5904\u5728\u4e8e\u53ef\u4ee5\u5feb\u901f\u90e8\u7f72\u548c\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\uff0c\u540c\u65f6\u786e\u4fdd\u73af\u5883\u7684\u4e00\u81f4\u6027\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u5f3a\u5927\u7684\u670d\u52a1\u5668\u652f\u6301\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7c73\u4e91\u63d0\u4f9b\u7684<a href=\"https:\/\/fwq.ai\">\u7f8e\u56fd\u4e91\u670d\u52a1\u5668<\/a>\uff0c\u4ee5\u6ee1\u8db3\u66f4\u9ad8\u7684\u6027\u80fd\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528Docker\u5b89\u88c5Mattermost\u7684\u6559\u7a0b 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\u901a\u8fc7Docker\u5b89\u88c5Mattermost\uff0c\u53ef\u4ee5\u7b80\u5316\u90e8\u7f72\u8fc7\u7a0b\uff0c\u5e76\u786e\u4fdd\u73af\u5883\u7684\u4e00\u81f4\u6027\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Docker\u5728\u672c\u5730\u6216\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Mattermost\u3002 \u524d\u63d0\u6761\u4ef6 \u786e\u4fdd\u5df2\u5b89\u88c5Docker\u548cDocker Compose\u3002 \u5177\u5907\u57fa\u672c\u7684\u547d\u4ee4\u884c\u64cd\u4f5c\u80fd\u529b\u3002 \u6709\u4e00\u4e2a\u53ef\u7528\u7684\u6570\u636e\u5e93\uff08\u5982PostgreSQL\u6216MySQL\uff09\uff0c\u53ef\u4ee5\u9009\u62e9\u5728Docker\u4e2d\u8fd0\u884c\u6570\u636e\u5e93\u3002 \u6b65\u9aa4\u4e00\uff1a\u62c9\u53d6Mattermost\u955c\u50cf \u9996\u5148\uff0c\u6253\u5f00\u7ec8\u7aef\u5e76\u62c9\u53d6Mattermost\u7684Docker\u955c\u50cf\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a docker pull mattermost\/mattermost-team-edition \u6b65\u9aa4\u4e8c\uff1a\u521b\u5efaDocker\u7f51\u7edc \u4e3a\u4e86\u8ba9Mattermost\u548c\u6570\u636e\u5e93\u80fd\u591f\u76f8\u4e92\u901a\u4fe1\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aDocker\u7f51\u7edc\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u7f51\u7edc\uff1a docker network create mattermost-network \u6b65\u9aa4\u4e09\uff1a\u8fd0\u884c\u6570\u636e\u5e93\u5bb9\u5668 \u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u8fd0\u884c\u4e00\u4e2a\u6570\u636e\u5e93\u5bb9\u5668\u3002\u8fd9\u91cc\u4ee5PostgreSQL\u4e3a\u4f8b\uff1a docker run -d &#8211;name mattermost-db &#8211;network mattermost-network -e POSTGRES_USER=mmuser -e POSTGRES_PASSWORD=mmuser_password -e POSTGRES_DB=mattermost postgres:latest \u6b65\u9aa4\u56db\uff1a\u8fd0\u884cMattermost\u5bb9\u5668 \u73b0\u5728\u53ef\u4ee5\u8fd0\u884cMattermost\u5bb9\u5668\u4e86\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a docker run -d &#8211;name mattermost-app &#8211;network mattermost-network -e MM_DB_DRIVER=postgres -e MM_DB_HOST=mattermost-db:5432 -e MM_DB_NAME=mattermost -e MM_DB_USER=mmuser -e MM_DB_PASSWORD=mmuser_password -p 8065:8065 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-13822","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/13822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=13822"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/13822\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=13822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=13822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=13822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}