Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{{- $onlyoffice := index .Values "onlyoffice-documentserver" }}
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Release.Name }}-onlyoffice-config"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
data:
onlyoffice-config.json: |
{
"apps": {
"onlyoffice": {
"DocumentServerInternalUrl": "",
"DocumentServerUrl": "https:\/\/{{ $onlyoffice.onlyoffice.server_name }}\/",
"StorageUrl": "https:\/\/{{ .Values.nextcloud.nextcloud.host }}\/",
"defFormats": "{\"csv\":\"false\",\"doc\":\"false\",\"docm\":\"false\",\"docx\":\"true\",\"dotx\":\"false\",\"epub\":\"false\",\"html\":\"false\",\"odp\":\"true\",\"ods\":\"true\",\"odt\":\"true\",\"pdf\":\"false\",\"potm\":\"false\",\"potx\":\"false\",\"ppsm\":\"false\",\"ppsx\":\"false\",\"ppt\":\"false\",\"pptm\":\"false\",\"pptx\":\"true\",\"rtf\":\"false\",\"txt\":\"false\",\"xls\":\"false\",\"xlsm\":\"false\",\"xlsx\":\"true\",\"xltm\":\"false\",\"xltx\":\"false\"}",
"editFormats": "{\"csv\":\"true\",\"odp\":\"true\",\"ods\":\"true\",\"odt\":\"true\",\"rtf\":\"false\",\"txt\":\"true\"}",
"enabled": "yes",
"groups": "[]",
"jwt_secret": "",
"sameTab": "false",
"settings_error": "",
"types": "filesystem"
}
}
}
onlyoffice-setup.sh: |
#!/bin/bash
set -ev
# Debug: place the json file in a persistent location for reuse
cp /var/local/onlyoffice-config.json /var/www/html/
# Only install onlyoffice if it's not installed already
if ! php occ app:list | grep -q onlyoffice; then
php occ app:install onlyoffice
fi
# Enable onlyoffice app
php occ app:enable onlyoffice
# Config settings from the configmap above
php occ config:import /var/local/onlyoffice-config.json
#
# All values in config.json are applied by the nextcloud occ command
# config:import.
# system.trusted_proxies contains a list of proxies that are considered
# to be trusted. 10.43.0.0/16 contains all ip addresses that are
# assigned to kuberentes services which includes the ip address of
# the ingress service that funtions as a proxy.
# apps.core.backroundjobs_mod set to cron disables the unreliable ajax
# scheduling that is enabled by default. Ajax scheduling is not needed
# because cronjobs are regularly executed by a kubernetes resource.
#