fix: use curl for Docmost health check, check Docker health status
All checks were successful
CI/CD / deploy (push) Successful in 13m46s
CI/CD / syntax-check (push) Successful in 1m0s

- wget not available in Docmost Node.js image → switch to curl
- Ansible now checks Docker health status instead of exec-ing into container
- Increased healthcheck start_period to 60s and retries to 10 for DB migrations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jack 2026-03-27 10:09:14 +07:00
parent 9f85988c1f
commit 8feff04136
2 changed files with 8 additions and 7 deletions

View file

@ -141,10 +141,11 @@
label: "{{ item.item }}"
# ── Docmost: wait for healthy ────────────────────────────────────────────────
- name: Wait for Docmost to be healthy
ansible.builtin.command: docker exec docmost wget -qO- http://127.0.0.1:3000/api/health
- name: Wait for Docmost container to be healthy
ansible.builtin.command: >
docker inspect --format='{{ '{{' }}.State.Health.Status{{ '}}' }}' docmost
register: docmost_health
changed_when: false
retries: 30
delay: 10
until: docmost_health.rc == 0
until: docmost_health.stdout == 'healthy'

View file

@ -513,11 +513,11 @@ services:
docmost-redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/api/health"]
test: ["CMD", "curl", "-sf", "http://127.0.0.1:3000/api/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
timeout: 10s
retries: 10
start_period: 60s
logging:
driver: json-file
options: