mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 19:51:57 +08:00
Merge pull request #2928 from bill88t/master
Add a very basic docker health check
This commit is contained in:
commit
e21a1b56fa
2 changed files with 8 additions and 0 deletions
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
|
||||
EXPOSE 8080
|
||||
CMD [ "./start-docker.sh" ]
|
||||
|
||||
HEALTHCHECK CMD sh DockerHealthcheck.sh
|
||||
|
|
Loading…
Reference in a new issue