synapse.yaml
· 3.3 KiB · YAML
原始文件
apiVersion: v1
kind: ConfigMap
metadata:
name: matrix-config
data:
POSTGRES_USER: postgres_user
POSTGRES_DB: postgres_synapse_database
POSTGRES_PASSWORD: postgres_password
POSTGRES_INITDB_ARGS: --encoding=UTF-8 --lc-collate=C --lc-ctype=C
## Sliding Sync Proxy, will need a separate database created manually in the container.
## podman exec -it matrix-db psql -U synapse -c 'CREATE DATABASE syncv3 WITH OWNER synapse'
## Replace 'postgres_user', 'postgres_password' and 'syncv3' with the correct values
SYNCV3_BINDADDR: "0.0.0.0:8118"
SYNCV3_DB: "user=postgres_user dbname=syncv3 sslmode=disable host=127.0.0.1 password='postgres_password'"
SYNCV3_SERVER: https://example.com"
SYNCV3_SECRET: ## Generate secret with `openssl rand -hex 32` and paste here
---
apiVersion: v1
kind: Pod
metadata:
annotations:
creationTimestamp: "2022-09-29T06:34:53Z"
labels:
app: matrix
name: matrix
spec:
volumes:
- name: matrix-psql-pvc
persistentVolumeClaim:
claimName: matrix-psql
- hostPath:
path: /path/to/matrix/synapse
type: Directory
name: data-matrix-synapse-host-0
#- hostPath:
# path: /path/to/matrix/mautrix-discord
# type: Directory
# name: data-matrix-mautrix-discord-host-0
#- hostPath:
# path: /path/to/matrix/mautrix-whatsapp
# type: Directory
# name: data-matrix-mautrix-whatsapp-host-0
#- hostPath:
# path: /path/to/matrix/mautrix-gmessages
# type: Directory
# name: data-matrix-mautrix-gmessages-host-0
containers:
- image: ghcr.io/matrix-org/synapse:latest
name: synapse
ports:
- containerPort: 8008
hostPort: 8008
- containerPort: 8118
hostPort: 8118
- containerPort: 9000
hostPort: 9001
resources: {}
securityContext:
capabilities:
drop:
- CAP_MKNOD
- CAP_AUDIT_WRITE
volumeMounts:
- mountPath: /data
name: data-matrix-synapse-host-0
- image: ghcr.io/matrix-org/sliding-sync:latest
name: syncv3
envFrom:
- configMapRef:
name: matrix-config
optional: false
resources: {}
- image: docker.io/library/postgres:14-alpine
args:
- postgres
envFrom:
- configMapRef:
name: matrix-config
optional: false
name: db
resources: {}
securityContext:
capabilities:
drop:
- CAP_MKNOD
- CAP_AUDIT_WRITE
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: matrix-psql-pvc
#- image: dock.mau.dev/mautrix/discord:latest
# imagePullPolicy: never
# name: discord
# resources: {}
# securityContext:
# capabilities:
# drop:
# - CAP_MKNOD
# - CAP_AUDIT_WRITE
# volumeMounts:
# - mountPath: /data
# name: data-matrix-mautrix-discord-host-0
#- image: dock.mau.dev/mautrix/whatsapp:latest
# name: whatsapp
# resources: {}
# securityContext:
# capabilities:
# drop:
# - CAP_MKNOD
# - CAP_AUDIT_WRITE
# volumeMounts:
# - mountPath: /data
# name: data-matrix-mautrix-whatsapp-host-0
#- image: dock.mau.dev/mautrix/gmessages:latest
# name: gmessages
# resources: {}
# securityContext:
# capabilities:
# drop:
# - CAP_MKNOD
# - CAP_AUDIT_WRITE
# volumeMounts:
# - mountPath: /data
# name: data-matrix-mautrix-gmessages-host-0
#restartPolicy: On-failure
status: {}
1 | apiVersion: v1 |
2 | kind: ConfigMap |
3 | metadata: |
4 | name: matrix-config |
5 | data: |
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 | --- |
19 | apiVersion: v1 |
20 | kind: Pod |
21 | metadata: |
22 | annotations: |
23 | creationTimestamp: "2022-09-29T06:34:53Z" |
24 | labels: |
25 | app: matrix |
26 | name: matrix |
27 | spec: |
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 |
127 | status: {} |