Added a view healthchecks

This commit is contained in:
Florian Zirker 2023-06-09 08:58:54 +02:00
parent 063ff194e2
commit 0520815da1
8 changed files with 75 additions and 16 deletions

View file

@ -11,6 +11,10 @@ services:
networks:
- web
- nextcloud
healthcheck:
test: curl -sSf 'http://localhost/status.php' | grep '"installed":true' | grep '"maintenance":false' | grep '"needsDbUpgrade":false' || exit 1
interval: 5s
timeout: 3s
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.rule=Host(`cloud.${DOMAIN}`)"
@ -123,6 +127,7 @@ services:
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MARIADB_AUTO_UPGRADE=1
logging:
driver: "json-file"
options:
@ -131,6 +136,10 @@ services:
networks:
- nextcloud
- mariadb
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 20s
timeout: 3s
labels:
- "docker.group=netxtcloud"
@ -166,6 +175,10 @@ services:
- monitoring
volumes:
- ${VOLUMES_PATH}/nextcloud/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
labels:
- "docker.group=netxtcloud"

View file

@ -22,6 +22,9 @@ http {
sendfile on;
#tcp_nopush on;
# Prevent nginx HTTP Server Detection
server_tokens off;
keepalive_timeout 65;
#gzip on;
@ -48,7 +51,7 @@ http {
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak