Skip to content

Commit

Permalink
Improve healthcheck for "db2" service
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Sep 20, 2023
1 parent f29467a commit 5fdc3ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -544,15 +544,17 @@ jobs:
LICENSE: "accept"
DBNAME: "doctrine"

options: "--privileged=true"
options: >-
--health-cmd "su - db2inst1 -c \"db2 -t CONNECT TO ${DBNAME};\""
--health-interval 20s
--health-timeout 10s
--health-retries 10
--privileged
ports:
- "50000:50000"

steps:
- name: "Perform healthcheck from the outside"
run: "docker logs -f ${{ job.services.ibm_db2.id }} | sed '/(*) Setup has completed./ q'"

- name: "Create temporary tablespace"
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;'"

Expand Down

0 comments on commit 5fdc3ee

Please sign in to comment.