-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
76 lines (74 loc) · 3.14 KB
/
docker-compose.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
version: "3.9"
networks:
# To create this run:
# > docker network create bem_net
bem_net:
external: true
services:
cradb:
image: registry.nspop.dk/platform/cradb:latest
ports:
- "8088:3306"
networks:
- bem_net
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
bemdb:
image: mariadb:10.2
# Expose database on a port on the host for debugging purpose
ports:
- "8086:3306"
networks:
- bem_net
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
volumes:
- ./etc/db/create_db.sql:/docker-entrypoint-initdb.d/00-create_db.sql
command: "--max-connections=1000"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
flyway_bem:
image: flyway/flyway:6.0
networks:
- bem_net
command: -url=jdbc:mysql://bemdb:3306 -schemas=bemyndigelse -user=root -connectRetries=60 migrate
volumes:
- ./etc/db/migration/bem/V1__Initial_schema.sql:/flyway/sql/V1__Initial_schema.sql
- ./etc/db/migration/bem/V2__Status_as_string.sql:/flyway/sql/V2__Status_as_string.sql
- ./etc/db/migration/bem/V3__Extended_whitelist.sql:/flyway/sql/V3__Extended_whitelist.sql
- ./etc/db/migration/bem/V4__Unique_delegerbar_rettigheder.sql:/flyway/sql/V4__Unique_delegerbar_rettigheder.sql
- ./etc/db/migration/bem/V5__Use_medium_blob_for_message_retransmassion.sql:/flyway/sql/V5__Use_medium_blob_for_message_retransmassion.sql
- ./etc/db/migration/bem/V6__Domain_cleanup_and_fixes.sql:/flyway/sql/V6__Domain_cleanup_and_fixes.sql
- ./etc/db/migration/bem/V7__Afkoble_bemyndigelser_fra_metadata.sql:/flyway/sql/V7__Afkoble_bemyndigelser_fra_metadata.sql
- ./etc/db/migration/bem/V8__BEM2_additions.sql:/flyway/sql/V8__BEM2_additions.sql
- ./etc/db/migration/bem/V9__BEM2_indexes.sql:/flyway/sql/V9__BEM2_indexes.sql
- ./etc/db/migration/bem/V10__BEM2_undelegatable_flag.sql:/flyway/sql/V10__BEM2_undelegatable_flag.sql
- ./etc/db/migration/bem/V11__BEM2_rettighed_uuid.sql:/flyway/sql/V11__BEM2_rettighed_uuid.sql
- ./etc/db/migration/bem/V12__Retransmission_table_indexes.sql:/flyway/sql/V12__Retransmission_table_indexes.sql
- ./etc/db/migration/bem/V13__Drop_BEM1_table.sql:/flyway/sql/V13__Drop_BEM1_table.sql
- ./etc/db/migration/bem/V14__Drop_retransmission_table.sql:/flyway/sql/V14__Drop_retransmission_table.sql
- ./etc/db/migration/bem/V15__Whitelist_Trifork_CVR.sql:/flyway/sql/V15__Whitelist_Trifork_CVR.sql
- ./etc/db/migration/bem/V16__Add_education_code.sql:/flyway/sql/V16__Add_education_code.sql
depends_on:
- bemdb
bem:
build:
context: .
dockerfile: Dockerfile
image: bem:latest
# Expose service on a port on the host for debugging purpose
ports:
- "8087:8080"
- "5007:5005"
depends_on:
cradb:
condition: service_started
bemdb:
condition: service_healthy
networks:
- bem_net
environment:
- NSP_TEST_FEDERATION=true
command: ["java","-Dlogging.config=/log4j2.xml","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005", "-jar", "application.jar"]