Add Nextcloud deployment and configuration
- Introduced Nextcloud module with Kubernetes resources including deployment, service, ingress, and cron job. - Configured Apache settings for Nextcloud with SSL support and compression. - Created secrets for mail and admin credentials. - Added necessary environment variables for Nextcloud configuration. - Removed unused Scaleway access and secret keys from secrets and variables. - Updated CoreDNS module to support custom host overrides. - Implemented backup bucket policies and lifecycle rules for Scaleway object storage. - Enhanced IAM policies and applications for backup and email services. - Added outputs for backup bucket and API keys.
This commit is contained in:
@@ -16,6 +16,13 @@ locals {
|
||||
"185.253.5.0"
|
||||
]
|
||||
|
||||
override_hosts = [
|
||||
{
|
||||
name = "cloud.alexpires.me"
|
||||
ip = "10.19.4.136"
|
||||
},
|
||||
]
|
||||
|
||||
zones = [
|
||||
{
|
||||
fqdn = "${local.lab_domain}"
|
||||
@@ -88,4 +95,40 @@ locals {
|
||||
}
|
||||
}
|
||||
|
||||
scaleway_smtp_host = "smtp.tem.scw.cloud"
|
||||
|
||||
nextcloud_fqdn = "cloud.alexpires.me"
|
||||
nextcloud_db_passwd = var.nextcloud_db_passwd
|
||||
nextcloud_db_root_password = var.nextcloud_db_root_password
|
||||
nextcloud_db_path = "${local.persistent_folder}/mysql/nextcloud"
|
||||
backup_folder = "/mnt/usb/backups/nextcloud"
|
||||
nextcloud_config = {
|
||||
mail_from = "cloud"
|
||||
mail_domain = "alexpires.me"
|
||||
smtp_user = var.scaleway_project_id
|
||||
smtp_password = local.mail_app_api_secret_key
|
||||
smtp_host = local.scaleway_smtp_host
|
||||
admin_password = var.nextcloud_admin_password
|
||||
db_host = module.nextcloud_db.host
|
||||
db_name = module.nextcloud_db.db_name
|
||||
db_user = module.nextcloud_db.app_crendentials_name
|
||||
db_password = module.nextcloud_db.app_crendentials_name
|
||||
}
|
||||
|
||||
backup_retention_days = 3
|
||||
backup_cron_schedule = "0 2 * * *" # Daily at 2 AM
|
||||
|
||||
backup_bucket_name = data.terraform_remote_state.scaleway.outputs.backup_bucket_name
|
||||
backup_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.backup_app_api_secret_key
|
||||
backup_app_api_access_key = data.terraform_remote_state.scaleway.outputs.backup_app_api_access_key
|
||||
mail_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.mail_app_api_secret_key
|
||||
}
|
||||
|
||||
data "terraform_remote_state" "scaleway" {
|
||||
backend = "s3"
|
||||
config = {
|
||||
bucket = "a13labs.infra.eu"
|
||||
key = "scaleway.core.infra.tfstate"
|
||||
region = "eu-west-1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user