mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
Merge pull request #2928 from bill88t/master
Add a very basic docker health check
This commit is contained in:
commit
e21a1b56fa
6
DockerHealthcheck.sh
Executable file
6
DockerHealthcheck.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if wget --spider -S "127.0.0.1:8080/login" 2>&1 | awk 'NR==2' | grep -w "HTTP/1.1 200 OK" ; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -33,3 +33,5 @@ RUN adduser -s /bin/false node; exit 0
|
|||||||
# Start the application
|
# Start the application
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD [ "./start-docker.sh" ]
|
CMD [ "./start-docker.sh" ]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD sh DockerHealthcheck.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user