|
| 1 | +services: |
| 2 | + # LDAP |
| 3 | + kerberos: |
| 4 | + container_name: kerberos |
| 5 | + image: nugaon/kerberos-with-ldap:latest |
| 6 | + volumes: |
| 7 | + - /dev/urandom:/dev/random |
| 8 | + ports: |
| 9 | + - 8800:88 |
| 10 | + - 4640:464 |
| 11 | + - 7490:749 |
| 12 | + ldap: |
| 13 | + image: nugaon/openldap-with-kerberos:latest |
| 14 | + container_name: ldap |
| 15 | + domainname: "example.com" # important: same as hostname |
| 16 | + hostname: "example.com" |
| 17 | + environment: |
| 18 | + LDAP_LOG_LEVEL: "256" |
| 19 | + LDAP_ORGANISATION: "Example" |
| 20 | + LDAP_DOMAIN: "example.com" |
| 21 | + LDAP_BASE_DN: "" |
| 22 | + LDAP_ADMIN_PASSWORD: "admin" |
| 23 | + LDAP_CONFIG_PASSWORD: "config" |
| 24 | + LDAP_READONLY_USER: "false" |
| 25 | + LDAP_READONLY_USER_USERNAME: "readonly" |
| 26 | + LDAP_READONLY_USER_PASSWORD: "readonly" |
| 27 | + LDAP_RFC2307BIS_SCHEMA: "false" |
| 28 | + LDAP_BACKEND: "mdb" |
| 29 | + LDAP_TLS: "true" |
| 30 | + LDAP_TLS_CRT_FILENAME: "ldap.crt" |
| 31 | + LDAP_TLS_KEY_FILENAME: "ldap.key" |
| 32 | + LDAP_TLS_CA_CRT_FILENAME: "ca.crt" |
| 33 | + LDAP_TLS_ENFORCE: "false" |
| 34 | + LDAP_TLS_CIPHER_SUITE: "SECURE256:-VERS-SSL3.0" |
| 35 | + LDAP_TLS_PROTOCOL_MIN: "3.1" |
| 36 | + LDAP_TLS_VERIFY_CLIENT: "demand" |
| 37 | + LDAP_REPLICATION: "false" |
| 38 | + #LDAP_REPLICATION_CONFIG_SYNCPROV: "binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical" |
| 39 | + #LDAP_REPLICATION_DB_SYNCPROV: "binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical" |
| 40 | + #docker-compose.ymlLDAP_REPLICATION_HOSTS: "#PYTHON2BASH:['ldap://ldap.example.com','ldap://ldap2.example.com']" |
| 41 | + KEEP_EXISTING_CONFIG: "false" |
| 42 | + LDAP_REMOVE_CONFIG_AFTER_SETUP: "false" |
| 43 | + LDAP_SSL_HELPER_PREFIX: "ldap" |
| 44 | + tty: true |
| 45 | + stdin_open: true |
| 46 | + volumes: |
| 47 | + - ldap-data:/var/lib/ldap |
| 48 | + - ldap-config:/etc/ldap/slapd.d |
| 49 | + - ldap-certs:/container/service/slapd/assets/certs/ |
| 50 | + - ./ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/ |
| 51 | + ports: |
| 52 | + - "389:389" |
| 53 | + - "636:636" |
| 54 | + |
| 55 | + phpldapadmin: |
| 56 | + image: osixia/phpldapadmin:latest |
| 57 | + container_name: ldapadmin |
| 58 | + environment: |
| 59 | + PHPLDAPADMIN_LDAP_HOSTS: ldap |
| 60 | + PHPLDAPADMIN_HTTPS: "false" |
| 61 | + ports: |
| 62 | + - "8888:80" |
| 63 | + depends_on: |
| 64 | + - ldap |
| 65 | + |
| 66 | + # Services |
| 67 | + event-bus: |
| 68 | + image: emqx/emqx:latest |
| 69 | + environment: |
| 70 | + - EMQX_ALLOW_ANONYMOUS=true |
| 71 | + - EMQX_LOADED_PLUGINS=emqx_management,emqx_auth_mnesia,emqx_recon,emqx_retainer,emqx_dashboard |
| 72 | + ports: |
| 73 | + - 1883:1883 |
| 74 | + - 18083:18083 |
| 75 | + - 8081:8081 |
| 76 | + |
| 77 | + mongo: |
| 78 | + image: bitnami/mongodb:latest |
| 79 | + environment: |
| 80 | + - "MONGODB_ROOT_PASSWORD=admin" |
| 81 | + - "MONGODB_DATABASE=authorization-server" |
| 82 | + - "MONGODB_USERNAME=authorization-server" |
| 83 | + - "MONGODB_PASSWORD=admin" |
| 84 | + volumes: |
| 85 | + - mongodb-vol:/bitnami/mongodb |
| 86 | + ports: |
| 87 | + - 27017:27017 |
| 88 | + |
| 89 | + mongo-configuration: |
| 90 | + image: bitnami/mongodb:latest |
| 91 | + user: root |
| 92 | + volumes: |
| 93 | + - mongodb-vol:/bitnami |
| 94 | + command: |
| 95 | + - bash |
| 96 | + - -c |
| 97 | + - > |
| 98 | + chown -R 1001:1001 /bitnami; |
| 99 | + sleep 10; |
| 100 | + mongosh identity-provider \ |
| 101 | + --host mongo \ |
| 102 | + --port 27017 \ |
| 103 | + --username root \ |
| 104 | + --password admin \ |
| 105 | + --authenticationDatabase admin \ |
| 106 | + --eval "db.createUser({user: 'identity-provider', pwd: 'admin', roles:[{role:'dbOwner', db: 'identity-provider'}]});"; |
| 107 | +
|
| 108 | + mongosh infrastructure-console \ |
| 109 | + --host mongo \ |
| 110 | + --port 27017 \ |
| 111 | + --username root \ |
| 112 | + --password admin \ |
| 113 | + --authenticationDatabase admin \ |
| 114 | + --eval "db.createUser({user: 'infrastructure-console', pwd: 'admin', roles:[{role:'dbOwner', db: 'infrastructure-console'}]});"; |
| 115 | +
|
| 116 | + mongosh communication-server \ |
| 117 | + --host mongo \ |
| 118 | + --port 27017 \ |
| 119 | + --username root \ |
| 120 | + --password admin \ |
| 121 | + --authenticationDatabase admin \ |
| 122 | + --eval "db.createUser({user: 'communication-server', pwd: 'admin', roles:[{role:'dbOwner', db: 'communication-server'}]});"; |
| 123 | +
|
| 124 | + mongosh test_authorization-server \ |
| 125 | + --host mongo \ |
| 126 | + --port 27017 \ |
| 127 | + --username root \ |
| 128 | + --password admin \ |
| 129 | + --authenticationDatabase admin \ |
| 130 | + --eval "db.createUser({user: 'authorization-server', pwd: 'admin', roles:[{role:'dbOwner', db: 'test_authorization-server'}]});" |
| 131 | +
|
| 132 | + development: |
| 133 | + environment: |
| 134 | + - SHELL=/bin/bash |
| 135 | + # - XDG_RUNTIME_DIR=/tmp |
| 136 | + # - WAYLAND_DISPLAY=${WAYLAND_DISPLAY} |
| 137 | + # - DISPLAY=:14 |
| 138 | + # - LIBGL_ALWAYS_INDIRECT=0 |
| 139 | + extra_hosts: |
| 140 | + example.com: 172.17.0.1 |
| 141 | + www.example.com: 172.17.0.1 |
| 142 | + accounts.localhost: 127.0.0.1 |
| 143 | + admin.localhost: 127.0.0.1 |
| 144 | + connect.localhost: 127.0.0.1 |
| 145 | + myaccount.localhost: 127.0.0.1 |
| 146 | + accounts.example.com: 172.17.0.1 |
| 147 | + admin.example.com: 172.17.0.1 |
| 148 | + connect.example.com: 172.17.0.1 |
| 149 | + myaccount.example.com: 172.17.0.1 |
| 150 | + build: . |
| 151 | + volumes: |
| 152 | + - ..:/workspace |
| 153 | + - ./krb5-client.conf:/etc/krb5.conf |
| 154 | + working_dir: /workspace |
| 155 | + |
| 156 | +volumes: |
| 157 | + mongodb-vol: |
| 158 | + ldap-data: |
| 159 | + ldap-config: |
| 160 | + ldap-certs: |
0 commit comments