diff --git a/DockerHealthcheck.sh b/DockerHealthcheck.sh new file mode 100644 index 0000000000..d2d6cff480 --- /dev/null +++ b/DockerHealthcheck.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +URL=${TRILIUM_URL:-"http://localhost:8080"} + +if curl -s "$URL" > /dev/null; then + echo "Trilium is up and running." + exit 0 +else + echo "Trilium is not responding." + exit 1 +fi diff --git a/Dockerfile b/Dockerfile index d8cb9b0c34..19918a3ca9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN set -x \ nasm \ libpng-dev \ python3 \ + curl \ && npm install \ && apk del .build-dependencies \ && npm run webpack \