Implement persistent block storage for Nextcloud user data, separating application and data layers: OpenTofu Changes: - tofu/volumes.tf: Create and attach Hetzner Volumes per client - Configurable size per client (default 100 GB for dev) - ext4 formatted, attached but not auto-mounted - tofu/variables.tf: Add nextcloud_volume_size to client config - tofu/terraform.tfvars: Set volume size for dev client (100 GB ~€5.40/mo) Ansible Changes: - ansible/roles/nextcloud/tasks/mount-volume.yml: New mount tasks - Detect volume device automatically - Format if needed, mount at /mnt/nextcloud-data - Add to fstab for persistence - Set correct permissions for www-data - ansible/roles/nextcloud/tasks/main.yml: Include volume mounting - ansible/roles/nextcloud/templates/docker-compose.nextcloud.yml.j2: - Use host mount /mnt/nextcloud-data/data instead of Docker volume - Keep app code in Docker volume (nextcloud-app) - User data now on Hetzner Volume Scripts: - scripts/resize-client-volume.sh: Online volume resizing - Resize via Hetzner API - Expand filesystem automatically - Show cost impact - Verify new size Documentation: - docs/storage-architecture.md: Complete storage guide - Architecture diagrams - Volume specifications - Sizing guidelines - Operations procedures - Performance considerations - Troubleshooting guide - docs/volume-migration.md: Step-by-step migration - Safe migration from Docker volumes - Rollback procedures - Verification checklist - Timeline estimates Benefits: ✅ Data independent from server instance ✅ Resize storage without rebuilding server ✅ Easy data migration between servers ✅ Better separation of concerns (app vs data) ✅ Simplified backup strategy ✅ Cost-optimized (pay for what you use) Volume Pricing: - 50 GB: ~€2.70/month - 100 GB: ~€5.40/month - 250 GB: ~€13.50/month - Resizable online, no downtime Note: Existing clients require manual migration Follow docs/volume-migration.md for safe migration procedure Closes #18 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
40 lines
912 B
YAML
40 lines
912 B
YAML
---
|
|
# Main tasks for Nextcloud deployment
|
|
|
|
- name: Include volume mounting tasks
|
|
include_tasks: mount-volume.yml
|
|
tags:
|
|
- nextcloud
|
|
- volume
|
|
|
|
- name: Include Docker deployment tasks
|
|
include_tasks: docker.yml
|
|
tags:
|
|
- nextcloud
|
|
- docker
|
|
|
|
- name: Include installation tasks
|
|
include_tasks: install.yml
|
|
tags:
|
|
- nextcloud
|
|
- install
|
|
|
|
- name: Include OIDC configuration tasks
|
|
include_tasks: oidc.yml
|
|
when: nextcloud_oidc_enabled | default(true)
|
|
tags:
|
|
- nextcloud
|
|
- oidc
|
|
|
|
- name: Include apps installation and configuration
|
|
include_tasks: apps.yml
|
|
tags:
|
|
- nextcloud
|
|
- apps
|
|
|
|
- name: Include email configuration
|
|
include_tasks: email.yml
|
|
when: mailgun_smtp_user is defined or (client_secrets.mailgun_smtp_user is defined and client_secrets.mailgun_smtp_user != "" and "PLACEHOLDER" not in client_secrets.mailgun_smtp_user)
|
|
tags:
|
|
- nextcloud
|
|
- email
|