{"id":1009,"date":"2021-04-07T09:44:43","date_gmt":"2021-04-07T01:44:43","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=1009"},"modified":"2021-04-07T11:05:12","modified_gmt":"2021-04-07T03:05:12","slug":"docker-compose-deploys-openldap-phpldapadm-ssp","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2021\/04\/docker-compose-deploys-openldap-phpldapadm-ssp\/","title":{"rendered":"docker-compose \u90e8\u7f72openLDAP+phpldapadmin+SSP + \u5bf9\u63a5\u96c6\u6210\u5404\u79cd\u670d\u52a1"},"content":{"rendered":"
\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4e09\u53e5\u8bdd\u5feb\u901f\u7684\u8ba4\u8bc6\u4e00\u4e0bLDAP\uff1a<\/p>\n
\u540d\u8bcd\u89e3\u91ca<\/strong><\/p>\n \u56fe\u5f62\u793a\u4f8b<\/strong><\/p>\n \u4e0a\u8fb9\u6765\u4e86\u4e00\u5806\u7684\u540d\u8bcd\u89e3\u91ca\uff0c\u770b\u7684\u4e91\u91cc\u96fe\u91cc\uff0c\u8fd8\u4e0d\u662f\u5f88\u660e\u767d\uff0c\u600e\u4e48\u8ddf\u81ea\u5df1\u7684\u7ec4\u7ec7\u67b6\u6784\u5bf9\u5e94\u8d77\u6765\u5462\uff1f\u770b\u770b\u4e0b\u8fb9\u7684\u56fe\u662f\u4e0d\u662f\u6e05\u6670\u660e\u4e86<\/p>\n OpenLdap<\/strong>: https:\/\/registry.hub.docker.com\/r\/tiredofit\/openldap <\/a><\/p>\n phpLDAPadmin<\/strong>: https:\/\/github.com\/osixia\/docker-phpLDAPadmin<\/a><\/p>\n\n
\n\u8c4c\u8c46\u591a\u591a<\/a><\/p>\n\u90e8\u7f72<\/h2>\n
docker-compose \u90e8\u7f72\u670d\u52a1<\/h3>\n
services:\n#openladp \u670d\u52a1\n openldap:\n image: tiredofit\/openldap:7.1.14\n container_name: ldap-service\n ports:\n - 389:389\n - 636:636\n volumes:\n - .\/backup:\/data\/backup\n - .\/data:\/var\/lib\/openldap\n - .\/config:\/etc\/openldap\/slapd.d\n - .\/certs:\/certs\n environment:\n - HOSTNAME=ldap-service\n - ORGANIZATION=\u725b\u903c\u514b\u62c9\u65af\u6709\u9650\u516c\u53f8\n - LOG_LEVEL=256\n - DOMAIN=ldap.example.com\n - ADMIN_PASS=123456\n - CONFIG_PASS=123456\n - DEBUG_MODE=FALSE\n\n - ENABLE_READONLY_USER=FALSE\n - READONLY_USER_USER=reader\n - READONLY_USER_PASS=reader\n\n - ENABLE_TLS=FALSE\n - TLS_CRT_FILENAME=cert.pem\n - TLS_KEY_FILENAME=key.pem\n - TLS_ENFORCE=FALSE\n - TLS_CIPHER_SUITE=ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:-DHE-DSS:-RSA:!aNULL:!MD5:!DSS:!SHA\n - TLS_VERIFY_CLIENT=never\n - SSL_HELPER_PREFIX=ldap\n\n - ENABLE_REPLICATION=FALSE\n - REPLICATION_CONFIG_SYNCPROV=binddn="cn=config" bindmethod=simple credentials="admin" searchbase="cn=config" type=refreshAndPersist retry="5 5 60 +" timeout=1 filter="(!(objectclass=olcGlobal))"\n - REPLICATION_DB_SYNCPROV=binddn="cn=admin,dc=example,dc=org" bindmethod=simple credentials="admin" searchbase="dc=example,dc=org" type=refreshAndPersist interval=00:00:00:10 retry="5 5 60 +" timeout=1\n - REPLICATION_HOSTS=ldap:\/\/ldap1.example.com ldap:\/\/ldap2.example.com ldap:\/\/ldap3.example.com\n - REMOVE_CONFIG_AFTER_SETUP=false\n\n - ENABLE_BACKUP=TRUE\n - BACKUP_INTERVAL=0400\n - BACKUP_RETENTION=10080\n networks:\n - ldapnetworks\n restart: always\n\n# ldap \u7ba1\u7406\u7aef\n phpldapadmin:\n image: osixia\/phpldapadmin:0.9.0\n container_name: phpldapadmin-service\n ports:\n - 6680:80\n environment:\n - TZ=Asia\/Shanghai\n - PHPLDAPADMIN_HTTPS="false"\n - PHPLDAPADMIN_LDAP_HOSTS=ldap-service\n networks:\n - ldapnetworks\n restart: always\n\n#ldap \u81ea\u52a8\u5bc6\u7801\u670d\u52a1\n self-service-password:\n image: 'tiredofit\/self-service-password:latest'\n container_name: 'self-service-password'\n ports:\n - '80:80'\n environment:\n - LDAP_SERVER=ldap:\/\/ldap-service:389\n - LDAP_BINDDN=cn=admin,dc=example,dc=com\n - LDAP_BINDPASS=123456\n - LDAP_BASE_SEARCH=ou=\u6280\u672f\u90e8,dc=example,dc=com\n - LDAP_LOGIN_ATTRIBUTE=cn \n - MAIL_FROM_NAME= Self Service Password\n - MAIL_FROM=admin@example.com\n - SMTP_DEBUG=0\n - SMTP_HOST=smtp.qiye.aliyun.com\n - SMTP_USER=admin@example.com\n - SMTP_PASS=123456\n - SMTP_PORT=465\n - SMTP_SECURE_TYPE=ssl\n - SMTP_AUTH_ON=true\n volumes:\n - .\/self-service-password\/data:\/www\/ssp\n - .\/self-service-password\/logs:\/www\/logs\n networks:\n - ldapnetworks\n restart: always\n\nnetworks:\n ldapnetworks:\n external: true\n<\/code><\/pre>\n
\u66f4\u591a\u90e8\u7f72\u53d8\u91cf\uff1a<\/h3>\n