mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-09 18:28:10 +02:00
Fix: Replace unsupported /dev/tcp healthcheck with onboard PHP socket check for websocket service
Replaced the previous shell-based /dev/tcp healthcheck with a PHP fsockopen() test to ensure compatibility with minimal base images. This avoids dependency on missing tools like nc or curl and provides a reliable onboard check. Conversation: https://chatgpt.com/share/68deb8ec-d920-800f-bd35-2869544fe30f
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
{{ ESPOCRM_SERVICE }}:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-c", "exec 3<>/dev/tcp/127.0.0.1/8080 && echo 'OK' && exec 3<&- 3>&-"]
|
||||
test: ["CMD", "php", "-r", "($s=@fsockopen('127.0.0.1',8080,$e,$E,2))?fclose($s):exit(1);"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
Reference in New Issue
Block a user