Skip to content

Commit

Permalink
Use another method to check PHP FPM health
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Sep 15, 2021
1 parent 190a6c0 commit 55bc178
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/docker-compose.test-fpm-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55bc178

Please sign in to comment.