blob: 059db1a3a0d943f07f1a4f5de4893244434536a2 [file] [log] [blame]
Ivan Berezovskiy2f8aa822019-01-09 14:01:21 +04001classes:
2- system.docker.client.images.ldap
Filip Pytloun7d6144a2017-04-13 13:36:45 +02003parameters:
Filip Pytloun7d6144a2017-04-13 13:36:45 +02004 docker:
5 client:
6 stack:
7 ldap:
Oleksii Molchanov2dded632020-07-28 23:34:03 +03008 version: '3.7'
Filip Pytloun7d6144a2017-04-13 13:36:45 +02009 service:
10 server:
Filip Pytloun78bf90c2017-05-02 12:14:06 +020011 networks:
12 - ldap
Filip Pytloun7d6144a2017-04-13 13:36:45 +020013 deploy:
14 restart_policy:
15 condition: any
16 image: ${_param:docker_image_openldap}
17 hostname: ldap01
18 domainname: ${_param:openldap_domain}
19 ports:
20 - 1389:389
21 - 1636:636
Oleksii Molchanov2dded632020-07-28 23:34:03 +030022 secrets:
23 - openldap-admin
24 - openldap-config
Filip Pytloun7d6144a2017-04-13 13:36:45 +020025 volumes:
26 - /srv/volumes/openldap/database:/var/lib/ldap
27 - /srv/volumes/openldap/config:/etc/ldap/slapd.d
Denis Egorenko0e219a12019-07-03 12:25:27 +040028 - ${_param:openldap_tls:keyfile}:/container/service/slapd/assets/certs/drivetrain_ldap.key:ro
29 - ${_param:openldap_tls:certfile}:/container/service/slapd/assets/certs/drivetrain_ldap.crt:ro
30 - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/container/service/slapd/assets/certs/ca.crt:ro
31 # copy to /container/run/service to avoid issues with owning certs as openldap user
32 # https://github.com/osixia/docker-openldap/issues/59
33 command: --copy-service
Filip Pytloun7d6144a2017-04-13 13:36:45 +020034 environment:
Oleksii Molchanovb7392b32021-05-21 11:48:36 +030035 HOSTNAME: ldap01
Filip Pytloun7d6144a2017-04-13 13:36:45 +020036 LDAP_ORGANISATION: "${_param:openldap_organisation}"
37 LDAP_DOMAIN: "${_param:openldap_domain}"
Oleksii Molchanov2dded632020-07-28 23:34:03 +030038 LDAP_ADMIN_PASSWORD_FILE: /run/secrets/openldap-admin
39 LDAP_CONFIG_PASSWORD_FILE: /run/secrets/openldap-config
Denis Egorenko0e219a12019-07-03 12:25:27 +040040 LDAP_TLS: "true"
41 LDAP_TLS_VERIFY_CLIENT: try
42 LDAP_TLS_CIPHER_SUITE: NORMAL:-VERS-SSL3.0:+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0
43 LDAP_TLS_CRT_FILENAME: drivetrain_ldap.crt
44 LDAP_TLS_KEY_FILENAME: drivetrain_ldap.key
45 LDAP_TLS_CA_CRT_FILENAME: ca.crt
Filip Pytloun7d6144a2017-04-13 13:36:45 +020046 admin:
Filip Pytloun78bf90c2017-05-02 12:14:06 +020047 networks:
48 - ldap
Filip Pytloun7d6144a2017-04-13 13:36:45 +020049 deploy:
50 restart_policy:
51 condition: any
52 image: ${_param:docker_image_phpldapadmin}
53 depends_on:
54 - server
55 hostname: ldap
Denis Egorenkob3781472019-07-11 19:08:59 +040056 command: --copy-service
57 volumes:
58 - ${_param:openldap_tls:keyfile}:/container/service/ldap-client/assets/certs/drivetrain_ldap.key:ro
59 - ${_param:openldap_tls:certfile}:/container/service/ldap-client/assets/certs/drivetrain_ldap.crt:ro
60 - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/container/service/ldap-client/assets/certs/ca.crt:ro
Filip Pytloun7d6144a2017-04-13 13:36:45 +020061 environment:
Denis Egorenkob3781472019-07-11 19:08:59 +040062 PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'server': [{'server': [{'host': 'ldaps://${_param:cicd_control_address}', 'tls': False}]},{'login': [{'bind_id': 'cn=admin,${_param:openldap_dn}'},{'bind_pass': '$PHPLDAPADMIN_LDAP_ADMIN_PASSWORD'}]}]}]"
63 PHPLDAPADMIN_LDAP_CLIENT_TLS: "true"
Denis Egorenkoba3db192019-10-28 16:15:48 +040064 PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME: ca.crt
65 PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME: drivetrain_ldap.crt
66 PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME: drivetrain_ldap.key
Denis Egorenkob3781472019-07-11 19:08:59 +040067 PHPLDAPADMIN_LDAP_CLIENT_TLS_REQCERT: 'try'
Filip Pytloun7d6144a2017-04-13 13:36:45 +020068 PHPLDAPADMIN_HTTPS: "false"
69 PHPLDAPADMIN_TRUST_PROXY_SSL: "true"
70 PHPLDAPADMIN_SERVER_ADMIN: ${_param:admin_email}
71 PHPLDAPADMIN_THEME: mirantis
72 ports:
73 - 18089:80
Filip Pytloun78bf90c2017-05-02 12:14:06 +020074 network:
75 ldap:
76 driver: overlay
77 driver_opts:
78 encrypted: 1
Oleksii Molchanov2dded632020-07-28 23:34:03 +030079 secrets:
80 openldap-admin:
81 external: true
82 value: ${_param:openldap_admin_password}
83 openldap-config:
84 external: true
85 value: ${_param:openldap_config_password}
86