diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 32d6df6..67e93a6 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -101,6 +101,19 @@ Then `docker compose up -d --build`. - LDAP (internal, app↔slapd): `ldap://localhost:389` (not mapped to the host) - LDAPS (for legacy apps / direct binds): `ldaps://:636` (TLS) +### Logs + +The all-in-one image runs the Node app and slapd (OpenLDAP) in one container, +both writing to the container's stdout/stderr, so `docker compose logs` is the +primary view (slapd runs with `-d 0`, so LDAP output is there too). + +```bash +docker compose logs -f sso-manager # app + slapd (stdout/stderr) +docker compose logs --tail=200 --since=10m sso-manager # recent context +docker compose exec sso-manager ldapsearch -x -H ldap://localhost:389 \ + -D "cn=admin,$LDAP_BASE_DN" -W -b "$LDAP_BASE_DN" # LDAP health check +``` + ### Available environment variables | Variable | Default | Description | diff --git a/README.md b/README.md index c39043c..79e6da1 100755 --- a/README.md +++ b/README.md @@ -147,3 +147,23 @@ ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=theta42,cn=schema,cn=config" olcAttri |-------|---------| | `app_sso_admin` | Full admin access: manage users, groups, OAuth clients | | `app_sso_oauth_admin` | Manage OAuth clients only | + +## Logs (Docker) + +The all-in-one image runs the Node app and slapd (OpenLDAP) in one container, +both writing to the container's stdout/stderr, so `docker compose logs` is the +primary view (slapd runs with `-d 0`, so LDAP output is there too). + +```bash +docker compose logs -f sso-manager # app + slapd (stdout/stderr) +# or, by container name: +docker logs -f sso-manager + +docker compose logs --tail=200 --since=10m sso-manager # recent context + +# Query the directory directly to confirm LDAP is healthy +docker compose exec sso-manager ldapsearch -x -H ldap://localhost:389 \ + -D "cn=admin,$LDAP_BASE_DN" -W -b "$LDAP_BASE_DN" +``` + +See [DEPLOYMENT.md](DEPLOYMENT.md) → *Troubleshooting* for LDAP-specific errors. diff --git a/docs/deployment.md b/docs/deployment.md index 13959cf..3719e87 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -54,6 +54,19 @@ Then `docker compose up -d --build`. - OIDC discovery: `http://localhost:3001/.well-known/openid-configuration` - LDAPS (legacy apps / direct binds): `ldaps://:636` +### Logs + +The all-in-one image runs the Node app and slapd (OpenLDAP) in one container, +both writing to the container's stdout/stderr, so `docker compose logs` is the +primary view (slapd runs with `-d 0`, so LDAP output is there too). + +```bash +docker compose logs -f sso-manager # app + slapd (stdout/stderr) +docker compose logs --tail=200 --since=10m sso-manager # recent context +docker compose exec sso-manager ldapsearch -x -H ldap://localhost:389 \ + -D "cn=admin,$LDAP_BASE_DN" -W -b "$LDAP_BASE_DN" # LDAP health check +``` + ### Environment variables | Variable | Default | Description |