added deployment file
This commit is contained in:
1 parent
061d5fd8a4
commit
125eab3cd4
14 files changed
+704
-1
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
// Check Apache + PHP + database readiness without requiring curl in the image.
|
||||
$socket = @fsockopen('127.0.0.1', 80, $errno, $error, 3);
|
||||
if (!$socket) {
|
||||
exit(1);
|
||||
}
|
||||
stream_set_timeout($socket, 3);
|
||||
fwrite($socket, "GET /healthz HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n");
|
||||
$status = fgets($socket);
|
||||
fclose($socket);
|
||||
exit(is_string($status) && preg_match('/^HTTP\/\d\.\d 200\b/', $status) ? 0 : 1);
|
||||
Reference in new issue
Block a user