summaryrefslogtreecommitdiff
path: root/roles/nextcloud/templates/pod-with-mariadb.yml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nextcloud/templates/pod-with-mariadb.yml.j2')
-rw-r--r--roles/nextcloud/templates/pod-with-mariadb.yml.j210
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/nextcloud/templates/pod-with-mariadb.yml.j2 b/roles/nextcloud/templates/pod-with-mariadb.yml.j2
index 7fa40cd4..92347a44 100644
--- a/roles/nextcloud/templates/pod-with-mariadb.yml.j2
+++ b/roles/nextcloud/templates/pod-with-mariadb.yml.j2
@@ -14,6 +14,7 @@ spec:
resources:
limits:
memory: "4Gi"
+{% if 'new' in item.value and item.value.new %}
env:
- name: NEXTCLOUD_TRUSTED_DOMAINS
value: "{{ item.value.hostnames | join(' ') }}"
@@ -25,6 +26,7 @@ spec:
value: nextcloud
- name: MYSQL_PASSWORD
value: "{{ item.value.database.password }}"
+{% endif %}
volumeMounts:
- name: nextcloud
mountPath: /var/www/html
@@ -36,8 +38,12 @@ spec:
mountPath: /etc/apache2/ports.conf
subPath: ports.conf
readOnly: true
+ - name: config
+ mountPath: /etc/apache2/tls/
+ subPath: tls
+ readOnly: true
ports:
- - containerPort: 8080
+ - containerPort: 8443
hostPort: {{ item.value.port }}
- name: database
image: "mariadb:{{ item.value.database.version }}"
@@ -50,6 +56,7 @@ spec:
resources:
limits:
memory: "2Gi"
+{% if 'new' in item.value and item.value.new %}
env:
- name: MYSQL_RANDOM_ROOT_PASSWORD
value: "true"
@@ -59,6 +66,7 @@ spec:
value: nextcloud
- name: MYSQL_PASSWORD
value: "{{ item.value.database.password }}"
+{% endif %}
volumeMounts:
- name: database
mountPath: /var/lib/mysql