mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
add healthcheck for redis
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
b36cc2e2b0
commit
aa0620f2ea
3 changed files with 14 additions and 1 deletions
|
|
@ -14,8 +14,10 @@ RUN set -ex; \
|
||||||
# Get rid of unused binaries
|
# Get rid of unused binaries
|
||||||
rm -f /usr/local/bin/gosu;
|
rm -f /usr/local/bin/gosu;
|
||||||
|
|
||||||
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
|
|
||||||
USER 999
|
USER 999
|
||||||
ENTRYPOINT ["/start.sh"]
|
ENTRYPOINT ["/start.sh"]
|
||||||
|
|
||||||
HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING || exit 1
|
HEALTHCHECK CMD /healthcheck.sh
|
||||||
LABEL com.centurylinklabs.watchtower.enable="false"
|
LABEL com.centurylinklabs.watchtower.enable="false"
|
||||||
|
|
|
||||||
3
Containers/redis/healthcheck.sh
Normal file
3
Containers/redis/healthcheck.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
|
||||||
|
|
@ -329,6 +329,14 @@
|
||||||
"image": "nextcloud/aio-redis",
|
"image": "nextcloud/aio-redis",
|
||||||
"user": "999",
|
"user": "999",
|
||||||
"init": true,
|
"init": true,
|
||||||
|
"healthcheck": {
|
||||||
|
"start_period": "0s",
|
||||||
|
"test": "/healthcheck.sh",
|
||||||
|
"interval": "30s",
|
||||||
|
"timeout": "30s",
|
||||||
|
"start_interval": "5s",
|
||||||
|
"retries": 3
|
||||||
|
},
|
||||||
"expose": [
|
"expose": [
|
||||||
"6379"
|
"6379"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue