{"id":1083,"date":"2021-12-14T10:28:43","date_gmt":"2021-12-14T02:28:43","guid":{"rendered":"https:\/\/www.yinyubo.com\/?p=1083"},"modified":"2022-05-16T18:01:57","modified_gmt":"2022-05-16T10:01:57","slug":"ldap","status":"publish","type":"post","link":"https:\/\/www.yinyubo.com\/?p=1083","title":{"rendered":"docker-compose\u5feb\u901f\u90e8\u7f72LDAP"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u80cc\u666f<\/h2>\n\n\n\n<p>\u5f00\u53d1\u4eba\u5458\u4e00\u822c\u4f1a\u7528\u5230\u5f88\u591a\u5f00\u53d1\u8f6f\u4ef6\uff0c\u4f8b\u5982GIT,SonarQueb,minio,rancher\u7b49\u7a0b\u5e8f\uff0c\u8fd9\u4e48\u591a\u7684\u7a0b\u5e8f\uff0c\u6bcf\u4e2a\u7a0b\u5e8f\u90fd\u6709\u81ea\u5df1\u7684\u4e00\u5957\u8d26\u6237\u7cfb\u7edf\u548c\u6743\u9650\u80af\u5b9a\u662f\u4e0d\u5408\u9002\u7684\uff0c\u4f5c\u4e3a\u7528\u6237\u6765\u8bf4\uff0c\u6211\u4eec\u80af\u5b9a\u662f\u5e0c\u671b\u540c\u4e00\u4e2a\u8d26\u6237\u80fd\u5728\u591a\u4e2a\u8f6f\u4ef6\u4e2d\u767b\u5f55\uff0c\u5c31\u50cf\u4e00\u4e2a\u5fae\u4fe1\u53f7\u53ef\u4ee5\u73a9\u817e\u8baf\u7684\u6240\u6709\u6e38\u620f\u3002\u4f5c\u4e3a\u7ba1\u7406\u5458\u6765\u8bf4\uff0c\u80af\u5b9a\u662f\u5e0c\u671b\u524d\u7aef\u5f00\u53d1\uff0c\u540e\u7aef\u5f00\u53d1\uff0c\u6d4b\u8bd5\u4eba\u5458\u7684\u6743\u9650\u662f\u5206\u5f00\u7684\uff0c\u5728\u4e00\u4e2a\u5730\u65b9\u4fee\u6539\uff0c\u6240\u6709\u8f6f\u4ef6\u7684\u6743\u9650\u90fd\u80fd\u540c\u6b65\u53d8\u66f4\u3002\u90a3\u6211\u4eec\u5c31\u91c7\u7528\u4e86ldap\u7684\u65b9\u5f0f\u6765\u5feb\u901f\u90e8\u7f72\u8bd5\u8bd5\u5427\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u524d\u63d0\u6761\u4ef6<\/h2>\n\n\n\n<p>ubuntu\u7cfb\u7edf\uff0c\u5b89\u88c5\u4e86docker\u548cdocker-compose<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u67b6\u6784\u56fe<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"626\" src=\"https:\/\/www.yinyubo.com\/wp-content\/uploads\/2021\/12\/image-17.png\" alt=\"\" class=\"wp-image-1084\" srcset=\"https:\/\/www.yinyubo.com\/wp-content\/uploads\/2021\/12\/image-17.png 738w, https:\/\/www.yinyubo.com\/wp-content\/uploads\/2021\/12\/image-17-300x254.png 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">docker-compose.yml\u5185\u5bb9<\/h2>\n\n\n\n<p>\u521b\u5efa\u4ee5\u4e0b\u5185\u5bb9\u7684docker-compose.yml \u6587\u4ef6\uff0c\u4f7f\u7528docker-compose up -d \u547d\u4ee4\u8fd0\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: '3'\r\n \r\nservices:\r\n    ldap-service:\r\n        image: osixia\/openldap:1.5.0\r\n        container_name: ldap-service\r\n        restart: always\r\n        hostname: ldap.zhenwei.local\r\n        environment:\r\n            - LDAP_ORGANISATION=zhenwei.li.Co.,Ltd.\r\n            - LDAP_DOMAIN=\u57df\u540d.com\r\n            - LDAP_ADMIN_PASSWORD=\u8d85\u7ba1\u5bc6\u7801\r\n            - LDAP_READONLY_USER=true\r\n            - LDAP_READONLY_USER_USERNAME=lzwread\r\n            - LDAP_READONLY_USER_PASSWORD=\u53ea\u8bfb\u5bc6\u7801\r\n            - LDAP_CONFIG_PASSWORD=\u53ea\u8bfb\u5bc6\u7801\r\n            - LDAP_TLS_VERIFY_CLIENT=never\r\n        networks:\r\n            server:\r\n        ports:\r\n          - \"389:389\"\r\n          - \"636:636\"\r\n        volumes:\r\n            - \/home\/zhenwei\/ldap\/database:\/var\/lib\/ldap\r\n            - \/home\/zhenwei\/ldap\/config:\/etc\/ldap\/slapd.d\r\n    ldap-backup:\r\n        image: osixia\/openldap-backup:1.5.0\r\n        container_name: ldap-backup\r\n        restart: always\r\n        environment:\r\n            - LDAP_ORGANISATION=zhenwei.li.Co.,Ltd.\r\n            - LDAP_BACKUP_CONFIG_CRON_EXP=\"0 2 * * *\"\r\n            - LDAP_DOMAIN=\u57df\u540d.com\r\n            - LDAP_ADMIN_PASSWORD=\u8d85\u7ba1\u5bc6\u7801\r\n            - LDAP_READONLY_USER=true\r\n            - LDAP_READONLY_USER_USERNAME=lzwread\r\n            - LDAP_READONLY_USER_PASSWORD=\u53ea\u8bfb\u5bc6\u7801\r\n            - LDAP_CONFIG_PASSWORD=\u53ea\u8bfb\u5bc6\u7801\r\n        volumes:\r\n            - \/home\/zhenwei\/ldap\/database:\/var\/lib\/ldap\r\n            - \/home\/zhenwei\/ldap\/config:\/etc\/ldap\/slapd.d\r\n            - \/home\/zhenwei\/ldap\/backup:\/data\/backup\r\n        networks:\r\n            server:\r\n    phpldap-service:\r\n        image: osixia\/phpldapadmin:0.9.0\r\n        container_name: phpldap-service\r\n        restart: always\r\n        environment:\r\n            - PHPLDAPADMIN_LDAP_HOSTS=10.80.3.249\r\n            - PHPLDAPADMIN_HTTPS=false\r\n        networks:\r\n          server:\r\n        ports:\r\n          - \"3081:80\"\r\n        volumes:\r\n            - \/home\/zhenwei\/ldap\/phpadmin-data:\/var\/www\/phpldapadmin\r\n        depends_on:\r\n            - ldap-service\r\n \r\n    ldap-ltb:\r\n        image: accenture\/adop-ldap-ltb:0.1.0\r\n        container_name: ldap-ltb\r\n        restart: always\r\n        networks:\r\n          server:\r\n        ports:\r\n          - \"8095:80\"\r\n        environment:\r\n            - LDAP_LTB_URL=ldap:\/\/ldap-service:389\r\n            - LDAP_LTB_BS=dc=zhenwei.li,dc=com\r\n            - LDAP_LTB_PWD=\u8d85\u7ba1\u5bc6\u7801\r\n            - LDAP_LTB_DN=cn=admin,dc=zhenwei.li,dc=com\r\n        depends_on:\r\n            - ldap-service\r\n        volumes:\r\n            - \/home\/zhenwei\/ldap\/ltb-config:\/usr\/share\/self-service-password\/conf\r\nnetworks:\r\n  server:\r\n#    external: true<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f \u5f00\u53d1\u4eba\u5458\u4e00\u822c\u4f1a\u7528\u5230\u5f88\u591a\u5f00\u53d1\u8f6f\u4ef6\uff0c\u4f8b\u5982GIT,SonarQueb,minio,rancher\u7b49\u7a0b\u5e8f\uff0c\u8fd9\u4e48\u591a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1083","post","type-post","status-publish","format-standard","hentry","category-influxdb"],"_links":{"self":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/1083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1083"}],"version-history":[{"count":4,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/1083\/revisions"}],"predecessor-version":[{"id":1088,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/1083\/revisions\/1088"}],"wp:attachment":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}