From 55bc178488cdfe1fa3e1bc97dd76a5a11ae32280 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Wed, 18 Aug 2021 18:33:46 +0200 Subject: [PATCH] Use another method to check PHP FPM health --- tests/docker-compose.test-fpm-postgres.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/docker-compose.test-fpm-postgres.yml b/tests/docker-compose.test-fpm-postgres.yml index 94b52ca..638853b 100644 --- a/tests/docker-compose.test-fpm-postgres.yml +++ b/tests/docker-compose.test-fpm-postgres.yml @@ -5,7 +5,9 @@ services: image: ${ROUNDCUBEMAIL_TEST_IMAGE:-roundcube-test-fpm} healthcheck: # Check until the FPM port is in in the LISTEN list - test: ["CMD-SHELL", "netstat -an | grep -q -F \":9000\""] + # test: ["CMD-SHELL", "netstat -an | grep -q -F \":9000\""] + # Or use php to test php since the non alpine fpm image has no binary able to know if a port is in listen mode + test: ["CMD-SHELL", "php -r '$$c = @fsockopen(\"localhost\", 9000); if (is_resource($$c)) { fwrite(STDOUT, \"OK\"); fclose($$c); exit(0); } else { fwrite(STDERR, \"FAIL\"); exit(1); }'"] interval: 2s timeout: 3s retries: 30