summaryrefslogtreecommitdiff
path: root/roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2
blob: 21284e0da07c18694390a0c4fe8552103435ab8c (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
securityContext:
  allowPrivilegeEscalation: false
containers:
- name: etherpad-lite
  image: equinox0815/etherpad-lite:{{ item.value.version }}
  # securityContext:
  #   runAsUser: {{ etherpad_lite_app_uid }}
  #   runAsGroup: {{ etherpad_lite_app_gid }}
  resources:
    limits:
      memory: "4Gi"
  volumeMounts:
  - name: config
    mountPath: /opt/etherpad-lite/settings.json
    subPath: settings.json
    readOnly: true
  ports:
  - containerPort: 9001
    hostPort: {{ item.value.port }}
    hostIP: 127.0.0.1
- name: database
  image: "mariadb:{{ item.value.database.version }}"
  securityContext:
    runAsUser: {{ etherpad_lite_db_uid }}
    runAsGroup: {{ etherpad_lite_db_gid }}
  resources:
    limits:
      memory: "4Gi"
  env:
  - name: MYSQL_RANDOM_ROOT_PASSWORD
    value: "true"
  - name: MYSQL_DATABASE
    value: etherpad-lite
  - name: MYSQL_USER
    value: etherpad-lite
  - name: MYSQL_PASSWORD
    value: "{{ item.value.database.password }}"
  volumeMounts:
  - name: database
    mountPath: /var/lib/mysql
volumes:
- name: config
  hostPath:
    path: "{{ etherpad_lite_base_path }}/{{ item.key }}/config/"
    type: Directory
- name: database
  hostPath:
    path: "{{ etherpad_lite_base_path }}/{{ item.key }}/{{ item.value.database.type }}"
    type: Directory