Update Nextcloud configuration and dependencies
This commit is contained in:
@@ -29,6 +29,9 @@ locals {
|
||||
OVERWRITEHOST = local.nextcloud_fqdn
|
||||
OVERWRITEPROTOCOL = "https"
|
||||
OVERWRITECLIURL = "https://${local.nextcloud_fqdn}"
|
||||
|
||||
# PHP
|
||||
PHP_MEMORY_LIMIT = "512M"
|
||||
}
|
||||
|
||||
nextcloud_secrets = {
|
||||
@@ -134,6 +137,18 @@ resource "kubernetes_secret" "nextcloud_admin_credentials" {
|
||||
type = "Opaque"
|
||||
}
|
||||
|
||||
resource "kubernetes_config_map" "nextcloud_apache_config" {
|
||||
metadata {
|
||||
name = "nextcloud-apache-config"
|
||||
namespace = kubernetes_namespace.nextcloud.metadata[0].name
|
||||
}
|
||||
data = {
|
||||
"99-nextcloudworkers.conf" = file("${path.module}/resources/apache2/99-nextcloudworkers.conf")
|
||||
"99-compression.conf" = file("${path.module}/resources/apache2/99-compression.conf")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
# Setup MariaDB database
|
||||
#
|
||||
@@ -291,14 +306,6 @@ resource "kubernetes_deployment" "nextcloud_redis" {
|
||||
name = "redis"
|
||||
image = "redis:latest"
|
||||
|
||||
resources {
|
||||
requests = {
|
||||
memory = "20Mi"
|
||||
}
|
||||
limits = {
|
||||
memory = "50Mi"
|
||||
}
|
||||
}
|
||||
security_context {
|
||||
allow_privilege_escalation = false
|
||||
}
|
||||
@@ -428,6 +435,19 @@ resource "kubernetes_deployment" "nextcloud_apache" {
|
||||
mount_path = "/var/www/html"
|
||||
name = "persistent-storage"
|
||||
}
|
||||
|
||||
volume_mount {
|
||||
mount_path = "/etc/apache2/conf-enabled/99-nextcloudworkers.conf"
|
||||
name = "apache-config"
|
||||
sub_path = "99-nextcloudworkers.conf"
|
||||
read_only = true
|
||||
}
|
||||
volume_mount {
|
||||
mount_path = "/etc/apache2/conf-enabled/99-compression.conf"
|
||||
name = "apache-config"
|
||||
sub_path = "99-compression.conf"
|
||||
read_only = true
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "persistent-storage"
|
||||
@@ -435,6 +455,12 @@ resource "kubernetes_deployment" "nextcloud_apache" {
|
||||
path = local.nextcloud_path
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "apache-config"
|
||||
config_map {
|
||||
name = kubernetes_config_map.nextcloud_apache_config.metadata[0].name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user