{"id":602,"date":"2021-10-22T03:50:00","date_gmt":"2021-10-22T03:50:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=602"},"modified":"2021-10-22T03:50:00","modified_gmt":"2021-10-22T03:50:00","slug":"602","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/10\/22\/602\/","title":{"rendered":"Docker \u5165\u95e8\u6559\u7a0b&#8212;&#8211;supervisor(\u8fdb\u7a0b\u7ba1\u5bb6)\u914d\u7f6e\u7f51\u7edc\u7ba1\u7406"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/10\/2814690112.png\" alt=\"supervisor.png\" title=\"supervisor.png\"><\/p>\n<h2>\u5148\u5efa\u7acb\u4e00\u4e2a\u5b89\u88c5\u548c\u4f7f\u7528supervisor(\u8fdb\u7a0b\u7ba1\u5bb6)\u7684\u5bb9\u5668\u955c\u50cf<\/h2>\n<pre><code>docker run -d -p 80:80  -p 9001:9001  \\r\n    --cpus 0.8   --restart=always   \\r\n    --name  test   hongwenjun\/nginx-php<\/code><\/pre>\n<h2>\u8fdb\u5165 Docker \u5bb9\u5668 test \u548c\u5b89\u88c5\u57fa\u672c\u6587\u672c\u5de5\u5177 nano<\/h2>\n<pre><code>docker exec -it test bash\n\napt update -y &amp;&amp;  apt install nano<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/10\/1290810820.png\" alt=\"net.png\" title=\"net.png\"><\/p>\n<h2>\u7f16\u8f91 <code>supervisord.conf<\/code> \uff0c\u6dfb\u52a0\u5f00\u542f\u7f51\u7edc\u7ba1\u7406\u914d\u7f6e http \u7ba1\u7406 \u7aef\u53e39001<\/h2>\n<pre><code>nano \/etc\/supervisord.conf\n\n# \u6dfb\u52a0 http \u7ba1\u7406 \u7aef\u53e39001\n[inet_http_server]\nport=*:9001\nusername=admin\npassword=nginx-php<\/code><\/pre>\n<h2>\u601d\u8003<\/h2>\n<ul>\n<li>Docker \u5bb9\u5668\u4e00\u822c\u90fd\u662f\u542f\u52a8\u4e00\u4e2a\u7a0b\u5e8f\u7684\uff0c\u5982\u679c\u81ea\u5df1\u5236\u4f5c\u5bb9\u5668\u8981\u542f\u52a8\u591a\u4e2a\u7a0b\u5e8f\u8fdb\u7a0b\u5c31\u8981\u4f7f\u7528 supervisor(\u8fdb\u7a0b\u7ba1\u5bb6) \u91cc\u542f\u52a8\u591a\u4e2a\u670d\u52a1\u3002<\/li>\n<li>supervisor(\u8fdb\u7a0b\u7ba1\u5bb6) \u4e5f\u53ef\u4ee5\u5f00\u542f\u7f51\u7edchttp \u670d\u52a1\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u91cd\u542f\u548c\u67e5\u770b \u5bb9\u5668\u4e2d\u7684\u65e5\u5fd7\u4e86\u3002<\/li>\n<li>\u4e00\u822c\u6211\u4eec\u4e0d\u60f3\u76f4\u63a5\u628a 9001\u7aef\u53e3\u66b4\u9732\u5230\u516c\u7f51\u4e0a\u8bbf\u95ee\uff0c\u53ef\u4ee5\u4f7f\u7528 nginx \u53cd\u5411\u4ee3\u7406\u8fd9\u4e2a http \u670d\u52a1\uff0c\u8fbe\u5230\u5b89\u5168\u6709\u53c8\u65b9\u4fbf\u4f7f\u7528\u4e86<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u5efa\u7acb\u4e00\u4e2a\u5b89\u88c5\u548c\u4f7f\u7528supervisor(\u8fdb\u7a0b\u7ba1\u5bb6)\u7684\u5bb9\u5668\u955c\u50cf docker run -d -p 8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[15],"class_list":["post-602","post","type-post","status-publish","format-standard","hentry","category-default","tag-docker"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}