anything-llm/docker/docker-healthcheck.sh
Francisco Bischoff 9ce3d1150d
Update Ubuntu base image and improve Dockerfile (#609)
* Update Ubuntu base image and improve Dockerfile

* Add unzip to Docker image dependencies

Needed for the arm64 build

* reset tabs

* formalized lint rules for hadolint. however the Docker formatting is being handled by MS Docker extension which doesn't indent code as expected. WIP.

* found a workaround to keep formatting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2024-03-06 16:34:45 -08:00

14 lines
318 B
Bash

#!/bin/bash
# Send a request to the specified URL
response=$(curl --write-out '%{http_code}' --silent --output /dev/null http://localhost:3001/api/ping)
# If the HTTP response code is 200 (OK), the server is up
if [ "$response" -eq 200 ]; then
echo "Server is up"
exit 0
else
echo "Server is down"
exit 1
fi