diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-10-12 19:51:56 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-10-12 19:51:56 +0200 |
commit | cc533015e4a66f89789002704c7c131fb56539ba (patch) | |
tree | be379697195f9b1fee69511e457d817030b27dc3 /roles/nextcloud/templates | |
parent | improve sshd config (diff) |
nextcloud role ~50% done
Diffstat (limited to 'roles/nextcloud/templates')
-rw-r--r-- | roles/nextcloud/templates/pod-with-mariadb.yml.j2 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/nextcloud/templates/pod-with-mariadb.yml.j2 b/roles/nextcloud/templates/pod-with-mariadb.yml.j2 new file mode 100644 index 00000000..4e2f6baa --- /dev/null +++ b/roles/nextcloud/templates/pod-with-mariadb.yml.j2 @@ -0,0 +1,52 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ item.key }}" +spec: + securityContext: + allowPrivilegeEscalation: false + containers: + - name: nextcloud + image: debian:buster + command: + - /bin/bash + - -c + - "sleep 7200" + # securityContext: + # runAsUser: {{ nextcloud_app_uid }} + # runAsGroup: {{ nextcloud_app_gid }} + volumeMounts: + - name: nextcloud + mountPath: /var/www/html + ports: + - containerPort: 8080 + hostPort: {{ item.value.port }} + - name: database + image: "mariadb:{{ item.value.database.version }}" + args: + - --transaction-isolation=READ-COMMITTED + - --binlog-format=ROW + securityContext: + runAsUser: {{ nextcloud_db_uid }} + runAsGroup: {{ nextcloud_db_gid }} + env: + - name: MYSQL_RANDOM_ROOT_PASSWORD + value: "true" + - name: MYSQL_PASSWORD + value: "{{ item.value.database.password }}" + - name: MYSQL_DATABASE + value: nextcloud + - name: MYSQL_USER + value: nextcloud + volumeMounts: + - name: database + mountPath: /var/lib/mysql + volumes: + - name: nextcloud + hostPath: + path: "{{ nextcloud_base_path }}/{{ item.key }}/nextcloud" + type: Directory + - name: database + hostPath: + path: "{{ nextcloud_base_path }}/{{ item.key }}/{{ item.value.database.type }}" + type: Directory |