-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-with-pre-made-images.yml
98 lines (94 loc) · 3.36 KB
/
docker-compose-with-pre-made-images.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
# Not up to date, see https://github.com/open-eid/cdoc2-java-ref-impl/test/README.md for working docker example
services:
cdoc2-shares-postgres:
container_name: cdoc2-shares-postgres
image: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d postgres -U postgres" ]
interval: 5s
timeout: 10s
retries: 120
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
cdoc2-shares-server-liquibase:
container_name: cdoc2-shares-server-liquibase
image: ${DOCKER_REGISTRY}cdoc2-shares-server/cdoc2-shares-server-liquibase:${SHARES_SERVER_DB_VERSION}
depends_on:
cdoc2-shares-postgres:
condition: service_started
environment:
- POSTGRES_URL=${POSTGRES_URL}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
command: liquibase --url="jdbc:postgresql://${POSTGRES_URL}/${POSTGRES_DB}?user=${POSTGRES_USER}&password=${POSTGRES_PASSWORD}" --defaults-file=/liquibase/cdoc2/liquibase.properties update
shares-server:
container_name: shares-server
image: ${DOCKER_REGISTRY}cdoc2-shares-server/shares-server:${SHARES_SERVER_VERSION}
ports:
- "8443:8443"
# monitoring
- "18443:18443"
depends_on:
cdoc2-shares-server-liquibase:
condition: service_completed_successfully
configs:
- source: shares-server-props
target: /config/application.properties
- source: truststore
target: /config/servertruststore.jks
- source: keystore
target: /config/cdoc2server.p12
environment:
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:file:/config/application.properties
- POSTGRES_URL=${POSTGRES_URL}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# - JAVA_OPTS=-Djavax.net.debug=ssl:handshake:verbose:keymanager:trustmanager -Djava.security.debug=access:stack
deploy:
resources:
limits:
memory: 1g
# second instance of shares-server, according to configured key-shares.properties in cdoc2-java-ref-impl repository
shares-server-second:
container_name: shares-server-second
image: ${DOCKER_REGISTRY}cdoc2-shares-server/shares-server:${SHARES_SERVER_VERSION}
ports:
- "8442:8442"
# monitoring
- "18442:18442"
depends_on:
cdoc2-shares-server-liquibase:
condition: service_completed_successfully
configs:
- source: shares-server-props
target: /config/application.properties
- source: truststore
target: /config/servertruststore.jks
- source: keystore
target: /config/cdoc2server.p12
environment:
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:file:/config/application.properties
- POSTGRES_URL=${POSTGRES_URL}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- server.port=8442
- management.server.port=18442
deploy:
resources:
limits:
memory: 1g
configs:
shares-server-props:
file: ./shares-server/config/application.properties.docker
truststore:
file: ./keys/servertruststore.jks
keystore:
file: ./keys/cdoc2server.p12