Production and the client's test server use ldaps://, so the dev server now offers TLS as well: ldaps on 636 (localhost:3636) and StartTLS on 389, with both ports also published on [::1]. A throwaway CA and server certificate are generated on every start, with the full CA extensions that Python 3.13+ strict verification requires. The CA certificate is copied to dev/ldap/export/ca.crt (gitignored). The server certificate covers localhost, the service names and ::1, but not 127.0.0.1, so tests can show that hostname mismatches are rejected.
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
# Dev dependencies only. The Django app runs natively (no container) and
|
|
# talks to LDAP on ldap://localhost:3389 (StartTLS) and ldaps://localhost:3636,
|
|
# and, if DATABASE_HOST=localhost is set, to PostgreSQL on localhost:5433
|
|
# (SQLite is used otherwise). The LDAP CA certificate is written to
|
|
# dev/ldap/export/ca.crt on every start.
|
|
#
|
|
# docker compose -f docker-compose.dev.yml up -d --build
|
|
# docker compose -f docker-compose.dev.yml up -d --force-recreate ldap # reset data
|
|
services:
|
|
ldap:
|
|
build: dev/ldap
|
|
image: ungleich-user-dev-ldap:2.6
|
|
environment:
|
|
LDAP_ADMIN_PASSWORD: admin
|
|
ports:
|
|
- "127.0.0.1:3389:389"
|
|
- "127.0.0.1:3636:636"
|
|
- "[::1]:3389:389"
|
|
- "[::1]:3636:636"
|
|
volumes:
|
|
- ./dev/ldap/export:/export
|
|
|
|
postgres:
|
|
image: postgres:18-alpine
|
|
environment:
|
|
POSTGRES_DB: ungleich_user
|
|
POSTGRES_USER: ungleich_user
|
|
POSTGRES_PASSWORD: dev-only
|
|
ports:
|
|
- "127.0.0.1:5433:5432"
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "ungleich_user"]
|
|
interval: 3s
|
|
retries: 20
|