summaryrefslogtreecommitdiff
path: root/roles/apps/onlyoffice/instance/templates/pod-spec.yml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/apps/onlyoffice/instance/templates/pod-spec.yml.j2')
-rw-r--r--roles/apps/onlyoffice/instance/templates/pod-spec.yml.j275
1 files changed, 75 insertions, 0 deletions
diff --git a/roles/apps/onlyoffice/instance/templates/pod-spec.yml.j2 b/roles/apps/onlyoffice/instance/templates/pod-spec.yml.j2
new file mode 100644
index 00000000..ec70f8c1
--- /dev/null
+++ b/roles/apps/onlyoffice/instance/templates/pod-spec.yml.j2
@@ -0,0 +1,75 @@
+terminationGracePeriodSeconds: 120
+containers:
+- name: documentserver
+ image: "onlyoffice/documentserver:{{ onlyoffice_instances[onlyoffice_instance].version }}"
+ resources:
+ limits:
+ memory: "4Gi"
+ env:
+ - name: "DB_TYPE"
+ value: "postgres"
+ - name: "DB_HOST"
+ value: "127.0.0.1"
+ - name: "DB_PORT"
+ value: "5432"
+ - name: "DB_NAME"
+ value: "onlyoffice"
+ - name: "DB_USER"
+ value: "onlyoffice"
+ - name: "DB_PWD"
+ value: "{{ onlyoffice_instances[onlyoffice_instance].database.password }}"
+ - name: "AMQP_TYPE"
+ value: "rabbitmq"
+ - name: "AMQP_URI"
+ value: "amqp://onlyoffice:{{ onlyoffice_instances[onlyoffice_instance].amqp.password }}@127.0.0.1:5672"
+ - name: "JWT_ENABLED"
+ value: "true"
+ - name: "JWT_SECRET"
+ value: "{{ onlyoffice_instances[onlyoffice_instance].jwt_secret }}"
+ volumeMounts:
+ - name: tls
+ mountPath: /var/www/onlyoffice/Data/certs/
+ readOnly: true
+ ports:
+ - containerPort: 443
+ hostPort: {{ onlyoffice_instances[onlyoffice_instance].port }}
+ hostIP: 127.0.0.1
+
+- name: postgresql
+ image: "postgres:{{ onlyoffice_instances[onlyoffice_instance].database.version }}"
+ args:
+ - postgres
+ - -c
+ - listen_addresses=127.0.0.1
+ env:
+ - name: "POSTGRES_DB"
+ value: "onlyoffice"
+ - name: "POSTGRES_USER"
+ value: "onlyoffice"
+ - name: "POSTGRES_PASSWORD"
+ value: "{{ onlyoffice_instances[onlyoffice_instance].database.password }}"
+ volumeMounts:
+ - name: postgres
+ mountPath: /var/lib/postgresql/data
+
+- name: rabbitmq
+ image: "rabbitmq:{{ onlyoffice_instances[onlyoffice_instance].amqp.version }}"
+ env:
+ - name: "RABBITMQ_NODENAME"
+ value: "rabbit@localhost"
+ - name: "RABBITMQ_NODE_IP_ADDRESS"
+ value: "127.0.0.1"
+ - name: "RABBITMQ_DEFAULT_USER"
+ value: "onlyoffice"
+ - name: "RABBITMQ_DEFAULT_PASS"
+ value: "{{ onlyoffice_instances[onlyoffice_instance].amqp.password }}"
+
+volumes:
+- name: tls
+ hostPath:
+ path: "{{ onlyoffice_instance_basepath }}/tls"
+ type: Directory
+- name: postgres
+ hostPath:
+ path: "{{ onlyoffice_instance_basepath }}/postgres"
+ type: Directory