Spaces:
Paused
Paused
Update healthcheck.sh
Browse files- healthcheck.sh +14 -6
healthcheck.sh
CHANGED
|
@@ -1,8 +1,16 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
# Simple HTTP server
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# Simple HTTP server using Python (always available in Ubuntu)
|
| 3 |
+
python3 -c "
|
| 4 |
+
import http.server, socketserver
|
| 5 |
|
| 6 |
+
class Handler(http.server.BaseHTTPRequestHandler):
|
| 7 |
+
def do_GET(self):
|
| 8 |
+
self.send_response(200)
|
| 9 |
+
self.end_headers()
|
| 10 |
+
self.wfile.write(b'PostgreSQL is running on port 5432')
|
| 11 |
+
def log_message(self, format, *args):
|
| 12 |
+
pass
|
| 13 |
+
|
| 14 |
+
with socketserver.TCPServer(('', 7860), Handler) as httpd:
|
| 15 |
+
httpd.serve_forever()
|
| 16 |
+
"
|