fix: use curl for Docmost health check, check Docker health status
- 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:
parent
9f85988c1f
commit
8feff04136
2 changed files with 8 additions and 7 deletions
|
|
@ -141,10 +141,11 @@
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
# ── Docmost: wait for healthy ────────────────────────────────────────────────
|
# ── Docmost: wait for healthy ────────────────────────────────────────────────
|
||||||
- name: Wait for Docmost to be healthy
|
- name: Wait for Docmost container to be healthy
|
||||||
ansible.builtin.command: docker exec docmost wget -qO- http://127.0.0.1:3000/api/health
|
ansible.builtin.command: >
|
||||||
|
docker inspect --format='{{ '{{' }}.State.Health.Status{{ '}}' }}' docmost
|
||||||
register: docmost_health
|
register: docmost_health
|
||||||
changed_when: false
|
changed_when: false
|
||||||
retries: 30
|
retries: 30
|
||||||
delay: 10
|
delay: 10
|
||||||
until: docmost_health.rc == 0
|
until: docmost_health.stdout == 'healthy'
|
||||||
|
|
|
||||||
|
|
@ -513,11 +513,11 @@ services:
|
||||||
docmost-redis:
|
docmost-redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
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
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 10
|
||||||
start_period: 30s
|
start_period: 60s
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
options:
|
options:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue