feat(restore): nextcloud restore smoke test scaffold
Nextcloud-Restore-Test nach dem Muster der anderen Restore-Smokes: - Borg-Extract von html (App-Code + config.php) und nextcloud.dump - pg_restore in isoliertes Test-Postgres (mit Retry-Schleife) - config.php wird im Restore-Lab auf Test-DB-Credentials gepatcht (produktive Secrets werden nicht gemountet) - Nextcloud startet gegen restaurierte Daten + Test-Redis - Smoke prueft HTTP /status.php und occ status (maintenance mode) - Produktive Nutzdaten unter /mnt/user/documents/nextcloud-data werden bewusst NICHT gemountet (zu gross fuer regelmaessigen Smoke) Erster Lauf steht aus und braucht Operator-Freigabe auf dem Host. Dispatcher und ntfy-Wrapper um Nextcloud erweitert. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
services:
|
||||
restoretest-nextcloud-postgres:
|
||||
# Gleiche Major-Version wie apps/nextcloud/docker-compose.yml in Produktion.
|
||||
image: postgres:18.4@sha256:8ff36f3c66371cba71d20ceedccfc3de9669a68737607888c4ef0af93abe8e39
|
||||
container_name: restoretest-nextcloud-postgres
|
||||
restart: "no"
|
||||
environment:
|
||||
TZ: Europe/Berlin
|
||||
POSTGRES_DB: nextcloud
|
||||
POSTGRES_USER: nextcloud
|
||||
POSTGRES_PASSWORD: restoretest-nextcloud-db
|
||||
PGDATA: /var/lib/postgresql/18/docker
|
||||
volumes:
|
||||
- /mnt/user/backups/restore-lab/nextcloud/postgres:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U nextcloud -d nextcloud"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
restoretest-nextcloud-redis:
|
||||
image: redis:8.8.0-alpine@sha256:09160599abd229764c0fb44cb6be640294e1d360a54b19985ab4843dcf2d90f1
|
||||
container_name: restoretest-nextcloud-redis
|
||||
restart: "no"
|
||||
command: redis-server --save "" --appendonly no
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
restoretest-nextcloud:
|
||||
# Gleicher Image-Digest wie apps/nextcloud/docker-compose.yml.
|
||||
image: nextcloud:33.0.4-apache@sha256:caa40b8beaf0057ac213d8dfc515c36ce64f7a8f0825b6a287e6f7cf2f4a095d
|
||||
container_name: restoretest-nextcloud
|
||||
restart: "no"
|
||||
depends_on:
|
||||
restoretest-nextcloud-postgres:
|
||||
condition: service_healthy
|
||||
restoretest-nextcloud-redis:
|
||||
condition: service_started
|
||||
environment:
|
||||
TZ: Europe/Berlin
|
||||
POSTGRES_HOST: restoretest-nextcloud-postgres
|
||||
POSTGRES_DB: nextcloud
|
||||
POSTGRES_USER: nextcloud
|
||||
POSTGRES_PASSWORD: restoretest-nextcloud-db
|
||||
REDIS_HOST: restoretest-nextcloud-redis
|
||||
NEXTCLOUD_ADMIN_USER: restoretest-admin
|
||||
NEXTCLOUD_ADMIN_PASSWORD: restoretest-nextcloud-admin-pass
|
||||
NEXTCLOUD_DATA_DIR: /var/www/html/data
|
||||
# Bewusst keine Trusted-Domain/Proxy-Konfiguration: Smoke prueft
|
||||
# nur localhost-HTTP, keine Traefik-Route.
|
||||
ports:
|
||||
# nur 127.0.0.1, keine Public-Route, keine Traefik-Labels
|
||||
- "127.0.0.1:18180:80"
|
||||
volumes:
|
||||
# Restore-Lab-Pfade: alles isoliert, keine produktiven Mounts.
|
||||
- /mnt/user/backups/restore-lab/nextcloud/html:/var/www/html
|
||||
- /mnt/user/backups/restore-lab/nextcloud/data:/var/www/html/data
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
Reference in New Issue
Block a user