A simple and lightweight LDAP portal application. You can change passwords, login shells, and add or remove public keys.
This section describes how to deploy to the production environment.
To run development server, please refer to the next section.
ssh [email protected]
git clone [email protected]:nkzwlab/ldap-portal.git
cd ldap-portal
Copy the sample.env and edit it.
LDAP_URI=ldaps://ldap.example.com/
LDAP_DOMAIN=dc=example,dc=com
ADMIN_CN=admin
PASSWORD=admincn_password
ADMIN_GROUP=administrators
EMAIL_DOMAIN=example.com
UID_NUMBER_START=10001
DEFALUT_GID_NUMBER=10001
NODE_ENV=development|test|production
SECRET=SECRETKEY
DEPLOY_DOMAIN=ldap-portal.example.com
REDIS_URL=redis://redis
REDIS_PASSWORD=redis_password
SLACK_SIGNING_SECRET=<your-signing-secret>
SLACK_BOT_TOKEN=xoxb-<your-bot-token>
SLACK_WEBHOOK_URL=https://hooks.slack.com/...
First, start the containers with default configuration.
The default docker-compose.yml is configured to run as "staging" environment.
The purpose is to verify your DNS configuration for https-portal, so change the environment to "production" by editing docker-compose.yml.
docker compose --profile prod up --build --detach
docker compose --profile logs logs --follow
Once you could see the web page in https://your-domain.example.com/
(with TLS errors), edit docker-compose.yml
and restart the server.
vim docker-compose.yml
docker compose --profile prod down
docker compose --profile prod up --build --detach
Then open https://your-domain.example.com/
again.
If insecure TLS error disappears, it works!
You can copy sample files
cp sample.env .env
cp sample.ldap.env .ldap.env
LDAP_URI=ldap://ldap.example.com/
LDAP_DOMAIN=dc=example,dc=com
SECRET=SECRETKEY
PASSWORD=admincn_password
DEPLOY_DOMAIN=ldap-portal.example.com
ADMIN_CN=admin
EMAIL_DOMAIN=example.com
NODE_ENV=development|test|production
LDAP_ADMIN_PASSWORD=YourPassw0rd!
LDAP_ORGANISATION=Example Company
LDAP_DOMAIN=ldap.example.com
LDAP_BASE_DN=dc=example,dc=com
LDAP_USERS_DN=ou=people,dc=example,dc=com
LDAP_GROUPS_DN=ou=groups,dc=example,dc=com
LAM_PASSWORD=YourPassw0rd!
docker compose --profile dev --profile ldap up --build
- Open
http://localhost:8081/
- Log in with the password you configured through env var
LDAP_ADMIN_PASSWORD
- Create first schema by following the prompt
Edit each .tsx files then the page hot-reloads immediately.