Skip to content

Commit

Permalink
⚙️ config(ci): Configure replica-set in --health-cmd in `ci:build:i…
Browse files Browse the repository at this point in the history
…mage`.
  • Loading branch information
make-github-pseudonymous-again committed Apr 17, 2024
1 parent 109616e commit ac4157e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci:build:image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,19 @@ jobs:
--volume "${GITHUB_WORKSPACE}/scripts/ensure-replica-set.js":/scripts/ensure-replica-set.js \
--log-opt max-size=100m \
--log-opt max-file=7 \
--health-cmd 'mongo --eval "replSet = \"meteor\"; hostname = \"mongodb\"" /scripts/ensure-replica-set.js' \
--health-interval 1m30s \
--health-retries 3 \
--health-timeout 10s \
--health-start-period 40s \
--health-start-interval 2s \
--name mongodb \
"mongo:${MONGO_VERSION}" mongod --dbpath /data/db --replSet meteor
sleep 5
docker exec mongodb mongo \
--eval 'replSet = "meteor"; hostname = "mongodb"' \
/scripts/ensure-replica-set.js
- name: Wait for MongoDB container to be healthy
run: |
timeout 60 bash -c \
'until docker inspect --format "{{json .State.Health }}" mongodb | jq -e ".Status == \"healthy\"" ; do sleep 1; done'
- name: Run server
env:
Expand Down

0 comments on commit ac4157e

Please sign in to comment.