1- version : ' 3.4'
2-
31services :
42 cdoc2-postgres :
53 container_name : cdoc2-postgres-bats
6- # Instruction to build local cdoc2-db: https://github.com/open-eid/cdoc2-capsule-server/server-db/README.md
7- image : cdoc2-db:version3
4+ image : postgres
5+ healthcheck :
6+ test : [ "CMD-SHELL", "pg_isready -d postgres -U postgres" ]
7+ interval : 5s
8+ timeout : 10s
9+ retries : 120
810 restart : always
911 ports :
1012 - " 7432:5432"
1113 environment :
1214 POSTGRES_DB : postgres
1315 POSTGRES_PASSWORD : postgres
14- PGDATA : postgres
16+ POSTGRES_USER : postgres
17+
18+ db-init :
19+ image : ghcr.io/open-eid/cdoc2-server-liquibase:${CDOC2_SERVERS_TAG}
20+ depends_on :
21+ cdoc2-postgres :
22+ condition : service_healthy
23+ command : --url jdbc:postgresql://cdoc2-postgres/postgres --username=postgres --password=postgres --defaultsFile=liquibase.properties update
24+
1525
1626 cdoc2-put-server :
1727 container_name : cdoc2-put-server-bats
18- image : ghcr.io/open-eid/cdoc2-put-server:v1.4.0-docker.0-7b16600584da49d0a504f7cdaa1066ba41f2b20e
28+ image : ghcr.io/open-eid/cdoc2-put-server:${CDOC2_SERVERS_TAG}
1929 ports :
2030 - " 8443:8443"
2131 # monitoring
@@ -34,7 +44,9 @@ services:
3444# - JAVA_OPTS=-Djavax.net.debug=ssl:handshake:verbose:keymanager:trustmanager -Djava.security.debug=access:stack
3545 depends_on :
3646 cdoc2-postgres :
37- condition : service_started
47+ condition : service_healthy
48+ db-init :
49+ condition : service_completed_successfully
3850# curl is not installed on image, and following healthcheck will fail
3951# healthcheck:
4052# test: curl -k --silent --fail --connect-timeout 1 https://localhost:18443/actuator/health|grep UP
@@ -46,7 +58,7 @@ services:
4658
4759 cdoc2-get-server :
4860 container_name : cdoc2-get-server-bats
49- image : ghcr.io/open-eid/cdoc2-get-server:v1.4.0-docker.0-7b16600584da49d0a504f7cdaa1066ba41f2b20e
61+ image : ghcr.io/open-eid/cdoc2-get-server:${CDOC2_SERVERS_TAG}
5062 ports :
5163 - " 8444:8444"
5264 # monitoring
@@ -63,7 +75,9 @@ services:
6375# - JAVA_OPTS=-Djavax.net.debug=ssl:handshake:verbose:keymanager:trustmanager -Djava.security.debug=access:stack
6476 depends_on :
6577 cdoc2-postgres :
66- condition : service_started
78+ condition : service_healthy
79+ db-init :
80+ condition : service_completed_successfully
6781 mem_limit : 1g
6882
6983
0 commit comments