Last active 1705433070

synapse.yaml

synapse.yaml Raw
1apiVersion: v1
2kind: ConfigMap
3metadata:
4 name: matrix-config
5data:
6 POSTGRES_USER: postgres_user
7 POSTGRES_DB: postgres_synapse_database
8 POSTGRES_PASSWORD: postgres_password
9 POSTGRES_INITDB_ARGS: --encoding=UTF-8 --lc-collate=C --lc-ctype=C
10 ## Sliding Sync Proxy, will need a separate database created manually in the container.
11 ## podman exec -it matrix-db psql -U postgres_user -c 'CREATE DATABASE syncv3 WITH OWNER postgres_user'
12 ## Replace 'postgres_user', 'postgres_password' and 'syncv3' with the correct values
13 ## Same applies for the bridges below
14 ##
15 #SYNCV3_BINDADDR: "0.0.0.0:8118"
16 #SYNCV3_DB: "user=postgres_user dbname=syncv3 sslmode=disable host=127.0.0.1 password='postgres_password'"
17 #SYNCV3_SERVER: "https://example.com" ## Replace with the domain of the HS
18 #SYNCV3_SECRET: ## Generate secret with `openssl rand -hex 32` and paste here
19
20---
21apiVersion: v1
22kind: Pod
23metadata:
24 annotations:
25 creationTimestamp: "2022-09-29T06:34:53Z"
26 labels:
27 app: matrix
28 name: matrix
29spec:
30 volumes:
31 - name: matrix-psql-pvc
32 persistentVolumeClaim:
33 claimName: matrix-psql
34 - hostPath:
35 path: /path/to/matrix/synapse
36 type: Directory
37 name: data-matrix-synapse-host-0
38
39 ## Bridges
40 #- hostPath:
41 # path: /path/to/matrix/mautrix-discord
42 # type: Directory
43 # name: data-matrix-mautrix-discord-host-0
44
45 #- hostPath:
46 # path: /path/to/matrix/mautrix-whatsapp
47 # type: Directory
48 # name: data-matrix-mautrix-whatsapp-host-0
49
50 #- hostPath:
51 # path: /path/to/matrix/mautrix-gmessages
52 # type: Directory
53 # name: data-matrix-mautrix-gmessages-host-0
54
55 containers:
56 - image: ghcr.io/matrix-org/synapse:latest
57 name: synapse
58 ports:
59 - containerPort: 8008
60 hostPort: 8008
61 - containerPort: 8118
62 hostPort: 8118
63 - containerPort: 9000
64 hostPort: 9001
65 resources: {}
66 securityContext:
67 capabilities:
68 drop:
69 - CAP_MKNOD
70 - CAP_AUDIT_WRITE
71 volumeMounts:
72 - mountPath: /data
73 name: data-matrix-synapse-host-0
74 - image: docker.io/library/postgres:14-alpine
75 args:
76 - postgres
77 envFrom:
78 - configMapRef:
79 name: matrix-config
80 optional: false
81 name: db
82 resources: {}
83 securityContext:
84 capabilities:
85 drop:
86 - CAP_MKNOD
87 - CAP_AUDIT_WRITE
88 volumeMounts:
89 - mountPath: /var/lib/postgresql/data
90 name: matrix-psql-pvc
91
92 ## Sliding sync, get synapse running first
93 #- image: ghcr.io/matrix-org/sliding-sync:latest
94 # name: syncv3
95 # envFrom:
96 # - configMapRef:
97 # name: matrix-config
98 # optional: false
99 # resources: {}
100
101 ## Bridges
102 #- image: dock.mau.dev/mautrix/discord:latest
103 # imagePullPolicy: never
104 # name: discord
105 # resources: {}
106 # securityContext:
107 # capabilities:
108 # drop:
109 # - CAP_MKNOD
110 # - CAP_AUDIT_WRITE
111 # volumeMounts:
112 # - mountPath: /data
113 # name: data-matrix-mautrix-discord-host-0
114
115 #- image: dock.mau.dev/mautrix/whatsapp:latest
116 # name: whatsapp
117 # resources: {}
118 # securityContext:
119 # capabilities:
120 # drop:
121 # - CAP_MKNOD
122 # - CAP_AUDIT_WRITE
123 # volumeMounts:
124 # - mountPath: /data
125 # name: data-matrix-mautrix-whatsapp-host-0
126
127 #- image: dock.mau.dev/mautrix/gmessages:latest
128 # name: gmessages
129 # resources: {}
130 # securityContext:
131 # capabilities:
132 # drop:
133 # - CAP_MKNOD
134 # - CAP_AUDIT_WRITE
135 # volumeMounts:
136 # - mountPath: /data
137 # name: data-matrix-mautrix-gmessages-host-0
138 restartPolicy: On-failure
139status: {}