Skip to content

Commit d02d8f7

Browse files
committed
Improve healthcheck for "db2" service
1 parent e797e8e commit d02d8f7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,15 +538,17 @@ jobs:
538538
LICENSE: "accept"
539539
DBNAME: "doctrine"
540540

541-
options: "--privileged=true"
541+
options: >-
542+
--privileged=true
543+
--health-cmd "su - db2inst1 -c \"grep -q 'Program db2icrt_local completed successfully.' ~db2inst1/sqllib/log/instance.log\""
544+
--health-interval 20s
545+
--health-timeout 10s
546+
--health-retries 10
542547
543548
ports:
544549
- "50000:50000"
545550

546551
steps:
547-
- name: "Perform healthcheck from the outside"
548-
run: "docker logs -f ${{ job.services.ibm_db2.id }} | sed '/(*) Setup has completed./ q'"
549-
550552
- name: "Create temporary tablespace"
551553
run: "docker exec ${{ job.services.ibm_db2.id }} su - db2inst1 -c 'db2 -t CONNECT TO doctrine; db2 -t CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K;'"
552554

0 commit comments

Comments
 (0)