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:
@@ -44,7 +44,6 @@ locals {
|
||||
|
||||
# backup
|
||||
local_backup_retention_days = 2
|
||||
cloud_backup_retention_days = 3
|
||||
mail_backup_path = "${local.persistent_folder}/backup.mail"
|
||||
gitea_backup_path = "${local.persistent_folder}/backup.gitea"
|
||||
sftpgo_backup_path = "${local.persistent_folder}/backup.sftpgo"
|
||||
@@ -108,43 +107,47 @@ locals {
|
||||
"Connection" = "upgrade"
|
||||
}
|
||||
},
|
||||
# {
|
||||
# private = true
|
||||
# path = "/tools/gitea"
|
||||
# upstream = "http://10.19.4.136:8000"
|
||||
# rewrite = "^/tools/gitea/(.*)$ /$1 break"
|
||||
# },
|
||||
{
|
||||
path = "/"
|
||||
},
|
||||
]
|
||||
},
|
||||
"nextcloud" = {
|
||||
http_port = 8081
|
||||
https_port = 8444
|
||||
custom_ingress_annotations = {
|
||||
"nginx.ingress.kubernetes.io/proxy-body-size" = "4G"
|
||||
"nginx.ingress.kubernetes.io/proxy-request-buffering" = "on"
|
||||
"nginx.ingress.kubernetes.io/proxy-buffer-size" = "32k"
|
||||
"nginx.ingress.kubernetes.io/proxy-buffers-number" = "16"
|
||||
}
|
||||
tls = true
|
||||
custom_snippet = file("${path.module}/resources/nextcloud.conf")
|
||||
resolver = "10.19.4.136"
|
||||
fqdn = ["cloud.alexpires.me"]
|
||||
upstream = "https://cloud.alexpires.me"
|
||||
locations = [
|
||||
{
|
||||
path = "/"
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
# VPS configuration
|
||||
instance_ips = [
|
||||
"${local.vps_1.ip}/32",
|
||||
]
|
||||
|
||||
vps_1 = {
|
||||
id = data.terraform_remote_state.contabo.outputs.instances[0].id
|
||||
name = data.terraform_remote_state.contabo.outputs.instances[0].name
|
||||
ip = data.terraform_remote_state.contabo.outputs.instances[0].ip_config[0].v4[0].ip
|
||||
}
|
||||
|
||||
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
|
||||
sftpgo_app_api_access_key = data.terraform_remote_state.scaleway.outputs.sftpgo_app_api_access_key
|
||||
sftpgo_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.sftpgo_app_api_secret_key
|
||||
}
|
||||
|
||||
data "scaleway_account_project" "default" {
|
||||
project_id = var.scaleway_project_id
|
||||
organization_id = var.scaleway_organization_id
|
||||
}
|
||||
|
||||
data "terraform_remote_state" "contabo" {
|
||||
data "terraform_remote_state" "scaleway" {
|
||||
backend = "s3"
|
||||
config = {
|
||||
bucket = "a13labs.infra.eu"
|
||||
key = "contabo.core.infra.tfstate"
|
||||
key = "scaleway.core.infra.tfstate"
|
||||
region = "eu-west-1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user