-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose-test-ci.yaml
81 lines (75 loc) · 2.29 KB
/
docker-compose-test-ci.yaml
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
volumes:
extract_db_data:
services:
pgsql:
image: postgres:12-alpine
environment:
- POSTGRES_DB=extract
- POSTGRES_USER=extractuser
- POSTGRES_PASSWORD=demopassword
ports:
- "5432:5432"
tomcat:
build: ./docker/tomcat
container_name: tomcat
depends_on:
pgsql:
condition: service_started
mailhog:
condition: service_started
volumes:
- /tmp/extract.war:/usr/local/tomcat/webapps/extract.war
- /tmp/log/extract:/var/log/extract
- /tmp/log/tomcat:/usr/local/tomcat/logs
- /tmp/extract:/var/extract
environment:
- JAVA_OPTS=-Xms1G -Xmx2G -Duser.language=fr -Duser.region=CH
ports:
- "8080:8080"
healthcheck:
test: curl --fail http://localhost:8080/extract || exit 1
interval: 10s
timeout: 10s
retries: 15
mailhog:
image: mailhog/mailhog
tty: true
ports:
- "1025:1025"
- "8025:8025"
volumes:
- ./docker/mailhog:/home/mailhog/conf
entrypoint: MailHog -auth-file=/home/mailhog/conf/auth-users
update_db_on_start:
build: ./docker/update-db
depends_on:
tomcat:
condition: service_healthy
volumes:
- ./sql/update_db.sql:/update_db.sql
- ./sql/create_test_data.sql:/create_test_data.sql
environment:
- PGHOST=pgsql
- PGDB=extract
- PGUSER=extractuser
- PGPASSWORD=demopassword
openldap:
image: osixia/openldap:1.5.0
container_name: openldap
environment:
- LDAP_ORGANISATION=Extract
- LDAP_DOMAIN=extract.org
- LDAP_ADMIN_PASSWORD=monsecretadmin
- LDAP_CONFIG_PASSWORD=monsecretconfig
- LDAP_RFC2307BIS_SCHEMA=true
- LDAP_REMOVE_CONFIG_AFTER_SETUP=true
- LDAP_TLS_VERIFY_CLIENT=try
ports:
- "389:389"
- "636:636"
ldap-ad:
build: ./docker/ldap-ad
volumes:
- ./docker/ldap-ad/users.ldif:/ldap/users.ldif
ports:
- "10389:10389"