summaryrefslogtreecommitdiff
path: root/roles/apps/onlyoffice/instance/templates/pod-spec.yml.j2
blob: ec70f8c120d7fb443bde29661c0de0d743df7de2 (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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