forked from ungleich-public/ungleich-user
Sessions, password reset tokens and pending registrations live in the database, so running more than one replica needs a shared one. With DATABASE_HOST set the app uses PostgreSQL (psycopg 3 binary wheels, no system libraries) with persistent, health-checked connections. Otherwise SQLite is used, at a path configurable with SQLITE_PATH so a single replica can keep it on a volume. docker-compose.dev.yml gains a PostgreSQL 18 service on localhost:5433. The full test suite passes on SQLite and PostgreSQL.
27 lines
845 B
YAML
27 lines
845 B
YAML
# Dev dependencies only. The Django app runs natively (no container) and
|
|
# talks to LDAP on ldap://localhost:3389 and, if DATABASE_HOST=localhost is
|
|
# set, to PostgreSQL on localhost:5433 (SQLite is used otherwise).
|
|
#
|
|
# 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"
|
|
|
|
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
|