{"id":1788,"date":"2020-07-11T01:32:49","date_gmt":"2020-07-10T17:32:49","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=1788"},"modified":"2020-09-06T14:54:56","modified_gmt":"2020-09-06T06:54:56","slug":"bookstack","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2020\/07\/11\/bookstack\/","title":{"rendered":"\u901a\u8fc7docker\u90e8\u7f72bookstack"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">BookStack\uff0c\u662f\u4e00\u4e2a\u57fa\u4e8eMinDoc\uff0c\u4f7f\u7528Beego\u5f00\u53d1\u7684\u5f00\u6e90\u5728\u7ebf\u6587\u6863\u7ba1\u7406\u7cfb\u7edf\uff0c\u529f\u80fd\u7c7b\u4f3cGitbook\u548c\u770b\u4e91<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u73af\u5883\u51c6\u5907\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">centos7\uff1a\u7269\u7406\u673a\u3001\u865a\u62df\u673a\u6216\u8005\u4e91\u670d\u52a1\u5668\u90fd\u53ef\u4ee5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u90e8\u7f72\u8fc7\u7a0b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u9996\u5148\u5728\u673a\u5668\u4e0a\u5b89\u88c5docker\u73af\u5883\uff0c\u6b64\u5904\u7701\u7565\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u4e0b\u8f7dbookstack\u955c\u50cf\uff0c\u8bbf\u95ee\u5730\u5740\uff1a <a rel=\"noreferrer noopener\" href=\"https:\/\/hub.docker.com\/r\/willdockerhub\/bookstack\" target=\"_blank\">https:\/\/hub.docker.com\/r\/willdockerhub\/bookstack<\/a> \u6216\u8005\u76f4\u63a5\u901a\u8fc7docker pull willdockerhub\/bookstack\u62c9\u53d6\u955c\u50cf\u5373\u53ef<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u62c9\u53d6mysql\u955c\u50cf\uff1a\u8bbf\u95ee\u5730\u5740 <a rel=\"noreferrer noopener\" href=\"https:\/\/hub.docker.com\/_\/mysql\" target=\"_blank\">https:\/\/hub.docker.com\/_\/mysql<\/a>  \u6216\u8005\u76f4\u63a5\u901a\u8fc7\u547d\u4ee4docker pull mysql\u8fdb\u884c\u62c9\u53d6\uff0c\u6ce8\u610f\u6b64\u65f6\u62c9\u53d6\u7684\u955c\u50cf\u4e3aMySQL8.0.20\u7248\u672c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001\u62c9\u53d6bookstack\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/data\/bookstack\/conf\nyum intall -y git\ngit clone https:\/\/github.com\/TruthHun\/BookStack.git --depth=1\ncp BookStack\/conf\/*.example \/data\/bookstack\/conf\/\ncd \/data\/bookstack\/conf\/\nrename .example '' *.example<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">5\u3001\u4fee\u6539app.conf\u6587\u4ef6\uff0c\u4e3b\u8981\u4fee\u6539MySQL\u6570\u636e\u5e93\u4fe1\u606f\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"409\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/11-1.png\" alt=\"\" class=\"wp-image-1801\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/11-1.png 601w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/11-1-300x204.png 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230\uff0c\u914d\u7f6e\u94fe\u63a5mysql\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662f\u5bb9\u5668\u5185\u90e8\u7684ip\u5730\u5740\uff0c\u5982\u679c\u5148\u542f\u52a8mysql \u90a3\u4e48mysql\u7684\u5bb9\u5668ip\u5730\u5740\u5c31\u662f172.17.0.2<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6\u3001\u4fee\u6539oauth.conf,\u4e3b\u8981\u4fee\u6539\u57df\u540d\u5730\u5740\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"244\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/12-1.png\" alt=\"\" class=\"wp-image-1802\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/12-1.png 604w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/12-1-300x121.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/12-1-600x242.png 600w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">7\u3001\u8fd0\u884c\u5bb9\u5668\uff1a\u9996\u5148\u8fd0\u884cMySQL\u5bb9\u5668\uff0c\u6267\u884c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/data\/mysql\ndocker run -itd --name mysql \\\n  --restart always \\\n  -p 3306:3306 \\\n  -e MYSQL_ROOT_PASSWORD=bookstack \\\n  -e MYSQL_DATABASE=bookstack \\\n  -e MYSQL_USER=bookstack \\\n  -e MYSQL_PASSWORD=bookstack \\\n  -v \/data\/mysql:\/var\/lib\/mysql \\\n  mysql --default-authentication-plugin=mysql_native_password<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">mysql\u7684\u7528\u6237\u540d\u4ee5\u53ca\u5bc6\u7801\u90fd\u662f\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\uff0c\u4f46\u662f\u4e00\u5b9a\u8981\u8ddfapp.conf\u91cc\u76f8\u5bf9\u5e94\uff0c\u540c\u65f6\u4e5f\u5c06mysql\u6570\u636e\u76ee\u5f55\u901a\u8fc7\u5377\u7684\u5f62\u5f0f\u6302\u8f7d\u51fa\u6765<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">8\u3001\u8fd0\u884cbookstack\u5bb9\u5668\uff0c\u6267\u884c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -itd --name bookstack \\\n  --restart always \\\n  -p 80:8181 \\\n  -v \/data\/bookstack\/conf:\/opt\/bookstack\/conf \\\n  willdockerhub\/bookstack<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u8ff0\u547d\u4ee4\u5c06\u5bb9\u5668\u5185\u90e8\u7684\u914d\u7f6e\u6587\u4ef6\u901a\u8fc7\u5377\u7684\u5f62\u5f0f\u6302\u8f7d\u51fa\u6765\uff0c\u6b64\u65f6\u4fee\u6539\/data\/bookstack\/conf\u4e0b\u7684\u914d\u7f6e\u6587\u4ef6\u5373\u53ef\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">9\u3001\u542f\u52a8\u5bb9\u5668\u540e\uff0c\u901a\u8fc7\u57df\u540d\u8fdb\u884c\u8bbf\u95ee\uff0c\u8d26\u53f7\u5bc6\u7801admin\/admin888<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"246\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/13-1.png\" alt=\"\" class=\"wp-image-1803\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/13-1.png 621w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/13-1-300x119.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/07\/13-1-600x238.png 600w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5907\u6ce8\uff1a\u5982\u679c\u8981\u4fee\u6539\u9875\u9762\u7684\u663e\u793a\u5185\u5bb9\uff0c\u76f4\u63a5\u8fdb\u5165\u5230\u5bb9\u5668\u4e2d\u4fee\u6539\u6e90\u4ee3\u7801\u5373\u53ef\u4e3b\u8981\u8def\u5f84\u4e3a\uff1a\/opt\/bookstack\/views\/widgets<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BookStack\uff0c\u662f\u4e00\u4e2a\u57fa\u4e8eMinDoc\uff0c\u4f7f\u7528Beego\u5f00\u53d1\u7684\u5f00\u6e90\u5728\u7ebf\u6587\u6863\u7ba1\u7406\u7cfb\u7edf\uff0c\u529f\u80fd\u7c7b\u4f3cGitbook\u548c [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1779,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,23],"tags":[45],"class_list":["post-1788","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-rong","tag-docker"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1788"}],"version-history":[{"count":3,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1788\/revisions"}],"predecessor-version":[{"id":1804,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1788\/revisions\/1804"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/1779"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}