-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (100 loc) · 3.35 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# SPDX-FileCopyrightText: Magenta ApS <https://magenta.dk>
# SPDX-License-Identifier: MPL-2.0
services:
# NOTE: this service should be kept synchronised with the one in .gitlab-ci.yml!
ldap:
container_name: ldap
image: osixia/openldap:1.5.0
command: ["--copy-service", "--loglevel", "debug"]
environment:
LDAP_ORGANISATION: "magenta"
LDAP_DOMAIN: "magenta.dk"
LDAP_ADMIN_PASSWORD: "AdminPassword123"
LDAP_CONFIG_PASSWORD: "ConfigPassword123"
LDAP_LOG_LEVEL: 512
volumes:
- ./dev-environment/ldif/:/container/service/slapd/assets/config/bootstrap/ldif/custom/:ro
- ./dev-environment/schema/:/container/service/slapd/assets/config/bootstrap/schema/custom/:ro
networks:
- default
# ports:
# - "389:389"
mo-init:
image: magentaaps/os2mo-init:5
environment:
MO_URL: "http://mo:5000"
CLIENT_ID: "dipex"
CLIENT_SECRET: "603f1c82-d012-4d04-9382-dbe659c533fb"
AUTH_SERVER: "http://keycloak:8080/auth"
AUTH_REALM: "mo"
volumes:
- type: bind
source: ./init.config.yaml
target: /config/config.yml
read_only: true
restart: on-failure
networks:
- os2mo_default
mo_ldap_import_export:
container_name: mo_ldap_ie
build: .
command: ["uvicorn", "--factory", "mo_ldap_import_export.main:create_app", "--host", "0.0.0.0", "--reload"]
environment:
# FastRAMQPI
FASTRAMQPI__JSON_LOGS: False
# DAP causes 'Address already in use' errors when running tests
FASTRAMQPI__DAP: "false"
# MO
FASTRAMQPI__AMQP__URL: "amqp://guest:guest@msg-broker"
FASTRAMQPI__AUTH_SERVER: "http://keycloak:8080/auth"
FASTRAMQPI__MO_URL: "http://mo:5000"
FASTRAMQPI__CLIENT_ID: "dipex"
FASTRAMQPI__CLIENT_SECRET: "603f1c82-d012-4d04-9382-dbe659c533fb"
# Database
FASTRAMQPI__DATABASE__USER: "fastramqpi"
FASTRAMQPI__DATABASE__PASSWORD: "fastramqpi"
FASTRAMQPI__DATABASE__HOST: "db"
FASTRAMQPI__DATABASE__NAME: "fastramqpi"
# LDAP
# Connection
LDAP_CONTROLLERS: '[{"host": "ldap"}]'
LDAP_DOMAIN: "magenta.dk"
LDAP_USER: "cn=admin,dc=magenta,dc=dk"
LDAP_PASSWORD: "AdminPassword123"
LDAP_AUTH_METHOD: "simple"
LDAP_DIALECT: "Standard"
# Synchronisation
# NOTE: these are NOT the settings used during integration tests! Those
# are defined in conftest.py.
LDAP_SEARCH_BASE: "dc=magenta,dc=dk"
LDAP_OUS_TO_SEARCH_IN: '["ou=os2mo,o=magenta"]'
LDAP_OUS_TO_WRITE_TO: '[""]'
LDAP_OU_FOR_NEW_USERS: "ou=os2mo,o=magenta"
LDAP_OBJECT_CLASS: "inetOrgPerson"
LISTEN_TO_CHANGES_IN_MO: True
LISTEN_TO_CHANGES_IN_LDAP: True
DEFAULT_ORG_UNIT_TYPE: "Afdeling"
DEFAULT_ORG_UNIT_LEVEL: "N1"
LDAP_CPR_ATTRIBUTE: "employeeNumber"
LDAP_IT_SYSTEM: "ADUUID"
volumes:
- ./mo_ldap_import_export/:/app/mo_ldap_import_export:ro
- ./dev-environment/kolding_fixture.yaml:/var/run/config.yaml:ro
- ./tests/:/app/tests/:ro
networks:
- default
- os2mo_default
ports:
- "127.0.0.1:8000:8000"
- "127.0.0.1:5678:5678"
db:
image: postgres:16
environment:
POSTGRES_USER: "fastramqpi"
POSTGRES_PASSWORD: "fastramqpi"
POSTGRES_DB: "fastramqpi"
networks:
- default
networks:
os2mo_default:
external: true