最后活跃于 1705433070

synapse.yaml

修订 0f577a94e2722b2facc91d6ab0d21adce46fa3d8

synapse.yaml 原始文件
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 synapse -c 'CREATE DATABASE syncv3 WITH OWNER synapse'
12 ## Replace 'postgres_user', 'postgres_password' and 'syncv3' with the correct values
13 SYNCV3_BINDADDR: "0.0.0.0:8118"
14 SYNCV3_DB: "user=postgres_user dbname=syncv3 sslmode=disable host=127.0.0.1 password='postgres_password'"
15 SYNCV3_SERVER: https://example.com"
16 SYNCV3_SECRET: ## Generate secret with `openssl rand -hex 32` and paste here
17
18---
19apiVersion: v1
20kind: Pod
21metadata:
22 annotations:
23 creationTimestamp: "2022-09-29T06:34:53Z"
24 labels:
25 app: matrix
26 name: matrix
27spec:
28 volumes:
29 - name: matrix-psql-pvc
30 persistentVolumeClaim:
31 claimName: matrix-psql
32 - hostPath:
33 path: /path/to/matrix/synapse
34 type: Directory
35 name: data-matrix-synapse-host-0
36 #- hostPath:
37 # path: /path/to/matrix/mautrix-discord
38 # type: Directory
39 # name: data-matrix-mautrix-discord-host-0
40 #- hostPath:
41 # path: /path/to/matrix/mautrix-whatsapp
42 # type: Directory
43 # name: data-matrix-mautrix-whatsapp-host-0
44 #- hostPath:
45 # path: /path/to/matrix/mautrix-gmessages
46 # type: Directory
47 # name: data-matrix-mautrix-gmessages-host-0
48
49 containers:
50 - image: ghcr.io/matrix-org/synapse:latest
51 name: synapse
52 ports:
53 - containerPort: 8008
54 hostPort: 8008
55 - containerPort: 8118
56 hostPort: 8118
57 - containerPort: 9000
58 hostPort: 9001
59 resources: {}
60 securityContext:
61 capabilities:
62 drop:
63 - CAP_MKNOD
64 - CAP_AUDIT_WRITE
65 volumeMounts:
66 - mountPath: /data
67 name: data-matrix-synapse-host-0
68 - image: ghcr.io/matrix-org/sliding-sync:latest
69 name: syncv3
70 envFrom:
71 - configMapRef:
72 name: matrix-config
73 optional: false
74 resources: {}
75 - image: docker.io/library/postgres:14-alpine
76 args:
77 - postgres
78 envFrom:
79 - configMapRef:
80 name: matrix-config
81 optional: false
82 name: db
83 resources: {}
84 securityContext:
85 capabilities:
86 drop:
87 - CAP_MKNOD
88 - CAP_AUDIT_WRITE
89 volumeMounts:
90 - mountPath: /var/lib/postgresql/data
91 name: matrix-psql-pvc
92 #- image: dock.mau.dev/mautrix/discord:latest
93 # imagePullPolicy: never
94 # name: discord
95 # resources: {}
96 # securityContext:
97 # capabilities:
98 # drop:
99 # - CAP_MKNOD
100 # - CAP_AUDIT_WRITE
101 # volumeMounts:
102 # - mountPath: /data
103 # name: data-matrix-mautrix-discord-host-0
104 #- image: dock.mau.dev/mautrix/whatsapp:latest
105 # name: whatsapp
106 # resources: {}
107 # securityContext:
108 # capabilities:
109 # drop:
110 # - CAP_MKNOD
111 # - CAP_AUDIT_WRITE
112 # volumeMounts:
113 # - mountPath: /data
114 # name: data-matrix-mautrix-whatsapp-host-0
115 #- image: dock.mau.dev/mautrix/gmessages:latest
116 # name: gmessages
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-gmessages-host-0
126 #restartPolicy: On-failure
127status: {}