-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (86 loc) · 3.05 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
version: "3.8"
services:
web:
build: .
stdin_open: true # docker run -i
tty: true # docker run -t
command: python /code/manage.py runserver 0.0.0.0:8000
environment:
SHIPANARO_SECRET_KEY: "$$e(u0!808ht4^aw9d6e!&=v!19wvg0cam!^in&w#)yt&=zyi+l"
SHIPANARO_DEBUG: "True"
SHIPANARO_EMAIL_URL: "${SHIPANARO_EMAIL_URL:-console://}"
SHIPANARO_ALLOWED_HOSTS: "0.0.0.0,localhost,127.0.0.1"
SHIPANARO_DATABASE_URL: postgres://postgres@db/postgres
SHIPANARO_LDAP_URL: "ldap://ldap"
SHIPANARO_LDAP_BIND_DN: "cn=admin,dc=pirata,dc=cat"
SHIPANARO_LDAP_BIND_PASSWORD: "admin"
SHIPANARO_LDAP_USER_SEARCH: "(&(objectclass=pilotPerson)(uid=%(user)s))"
ports:
- 8010:8000
volumes:
- .:/code
depends_on:
- db
- ldap
db:
image: postgres:11
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data/
ldap:
# https://github.com/osixia/docker-openldap
# https://github.com/osixia/docker-openldap/blob/stable/example/docker-compose.yml
image: osixia/openldap:1.4.0
container_name: openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "Pirates de Catalunya"
LDAP_DOMAIN: "pirata.cat"
LDAP_BASE_DN: ""
LDAP_ADMIN_PASSWORD: "admin"
LDAP_CONFIG_PASSWORD: "config"
LDAP_READONLY_USER: "false"
#LDAP_READONLY_USER_USERNAME: "readonly"
#LDAP_READONLY_USER_PASSWORD: "readonly"
LDAP_RFC2307BIS_SCHEMA: "false"
LDAP_BACKEND: "mdb"
LDAP_TLS: "true"
LDAP_TLS_CRT_FILENAME: "ldap.crt"
LDAP_TLS_KEY_FILENAME: "ldap.key"
LDAP_TLS_DH_PARAM_FILENAME: "dhparam.pem"
LDAP_TLS_CA_CRT_FILENAME: "ca.crt"
LDAP_TLS_ENFORCE: "false"
LDAP_TLS_CIPHER_SUITE: "SECURE256:-VERS-SSL3.0"
LDAP_TLS_VERIFY_CLIENT: "demand"
LDAP_REPLICATION: "false"
#LDAP_REPLICATION_CONFIG_SYNCPROV: "binddn="cn=admin,cn=config" bindmethod=simple credentials=$$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical"
#LDAP_REPLICATION_DB_SYNCPROV: "binddn="cn=admin,$$LDAP_BASE_DN" bindmethod=simple credentials=$$LDAP_ADMIN_PASSWORD searchbase="$$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical"
#LDAP_REPLICATION_HOSTS: "#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']"
KEEP_EXISTING_CONFIG: "false"
LDAP_REMOVE_CONFIG_AFTER_SETUP: "true"
LDAP_SSL_HELPER_PREFIX: "ldap"
tty: true
stdin_open: true
ports:
- "389:389"
- "636:636"
volumes:
- ldap_data:/var/lib/ldap
- ldap_config:/etc/ldap/slapd.d
- ldap_certs:/container/service/slapd/assets/certs/
- ./testdata:/testdata
ldapadmin:
# https://github.com/osixia/docker-phpLDAPadmin
image: osixia/phpldapadmin:0.9.0
environment:
PHPLDAPADMIN_LDAP_HOSTS: ldap
ports:
- 9876:443
volumes:
postgres_data:
ldap_data:
ldap_config:
ldap_certs: