瀏覽代碼

Minor fix

undefined
Gattes 1 月之前
父節點
當前提交
bf037fe2f9
共有 3 個檔案被更改,包括 7 行新增6 行删除
  1. 1
    3
      docker-compose.yaml
  2. 3
    3
      install.sh
  3. 3
    0
      killall.sh

+ 1
- 3
docker-compose.yaml 查看文件

2
 services:
2
 services:
3
 
3
 
4
   synapse:
4
   synapse:
5
-    image: ghcr.io/element-hq/synapse:v1.126.1
5
+    image: ghcr.io/element-hq/synapse:v1.126.0
6
     restart: always
6
     restart: always
7
     environment:
7
     environment:
8
       - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
8
       - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
71
       matrix_server:
71
       matrix_server:
72
         ipv4_address: 10.10.10.7
72
         ipv4_address: 10.10.10.7
73
       matrix_db:
73
       matrix_db:
74
-    ports:
75
-      - 8009:8008
76
     depends_on:
74
     depends_on:
77
       - synapse
75
       - synapse
78
 
76
 

+ 3
- 3
install.sh 查看文件

1
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
-set -euo pipefail
3
+set -eo pipefail
4
 
4
 
5
 DOMAIN=$1
5
 DOMAIN=$1
6
 if [ -z ${DOMAIN} ]; then
6
 if [ -z ${DOMAIN} ]; then
96
 
96
 
97
 # Generate synapse file
97
 # Generate synapse file
98
 echo -e "Generating synapse file..\n"
98
 echo -e "Generating synapse file..\n"
99
-docker compose run --rm -e SYNAPSE_SERVER_NAME=${DOMAIN} -e SYNAPSE_REPORT_STATS=yes synapse generate
99
+docker compose run --rm synapse_homeserver --generate-config -H ${DOMAIN} -c /data/homeserver.yaml --report-stats=yes
100
 
100
 
101
 # Replace DB config in Synapse's homeserver.yaml
101
 # Replace DB config in Synapse's homeserver.yaml
102
 echo -e "Configuring homeserver.yaml\n"
102
 echo -e "Configuring homeserver.yaml\n"
188
 
188
 
189
     # Sliding Sync
189
     # Sliding Sync
190
     location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
190
     location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
191
-        proxy_pass http://10.10.10.7:8009;
191
+        proxy_pass http://10.10.10.7:8008;
192
         proxy_set_header X-Forwarded-For \$remote_addr;
192
         proxy_set_header X-Forwarded-For \$remote_addr;
193
         proxy_set_header X-Forwarded-Proto \$scheme;
193
         proxy_set_header X-Forwarded-Proto \$scheme;
194
         proxy_set_header Host \$host;
194
         proxy_set_header Host \$host;

+ 3
- 0
killall.sh 查看文件

11
     systemctl disable --now nginx
11
     systemctl disable --now nginx
12
     systemctl disable --now coturn
12
     systemctl disable --now coturn
13
 
13
 
14
+    echo "Deleting all containers"
15
+    for container in `docker ps -a  | awk '{print $1}' | tail +2`; do docker rm -f ${container}; done
16
+
14
     echo "Purging containers data"
17
     echo "Purging containers data"
15
     docker system prune -a -f
18
     docker system prune -a -f
16
 
19
 

Loading…
取消
儲存