Skip to content

Commit

Permalink
add healthcheck for fts
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L. <[email protected]>
  • Loading branch information
szaimen committed Dec 3, 2024
1 parent fe3e640 commit f333f74
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Containers/fulltextsearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*;

COPY --chmod=775 healthcheck.sh /healthcheck.sh

USER 1000:0

HEALTHCHECK CMD nc -z 127.0.0.1 9200 || exit 1
HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD /healthcheck.sh
LABEL com.centurylinklabs.watchtower.enable="false"
3 changes: 3 additions & 0 deletions Containers/fulltextsearch/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

nc -z 127.0.0.1 9200 || exit 1
8 changes: 8 additions & 0 deletions php/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,14 @@
"display_name": "Fulltextsearch",
"image": "nextcloud/aio-fulltextsearch",
"init": false,
"healthcheck": {
"start_period": "60s",
"test": "/healthcheck.sh",
"interval": "10s",
"timeout": "5s",
"start_interval": "5s",
"retries": 5
},
"expose": [
"9200"
],
Expand Down

0 comments on commit f333f74

Please sign in to comment.