4 コミット

作成者 SHA1 メッセージ 日付
  Gattes a83ce8fef3 Adding Healthcheck and upgrading to latest synapse backend 1ヶ月前
  Gattes bf037fe2f9 Minor fix 1ヶ月前
  Gattes abab6cd41c Minor bumps and fixes 1ヶ月前
  Miguel 01fc922ac7 Bumping up version 1ヶ月前
2個のファイルの変更24行の追加35行の削除
  1. 14
    20
      docker-compose.yaml
  2. 10
    15
      install.sh

+ 14
- 20
docker-compose.yaml ファイルの表示

@@ -17,9 +17,15 @@ services:
17 17
       matrix_db:
18 18
     ports:
19 19
       - 8008:8008
20
+    healthcheck:
21
+      test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"]
22
+      interval: 15s
23
+      timeout: 5s
24
+      retries: 3
25
+      start_period: 5s
20 26
 
21 27
   db:
22
-    image: docker.io/postgres:16.2-alpine
28
+    image: docker.io/postgres:16-alpine
23 29
     environment:
24 30
       - POSTGRES_DB=synapse
25 31
       - POSTGRES_USER=matrix_synapse
@@ -39,7 +45,8 @@ services:
39 45
       matrix_server:
40 46
         ipv4_address: 10.10.10.3
41 47
     depends_on:
42
-      - synapse
48
+      synapse:
49
+        condition: service_healthy
43 50
 
44 51
   sydent:
45 52
     image: docker.io/matrixdotorg/sydent:v2.6.1
@@ -48,7 +55,8 @@ services:
48 55
       matrix_server:
49 56
         ipv4_address: 10.10.10.5
50 57
     depends_on:
51
-      - synapse
58
+      synapse:
59
+        condition: service_healthy
52 60
 
53 61
   synapse-admin:
54 62
     image: awesometechnologies/synapse-admin:0.10.3
@@ -57,25 +65,11 @@ services:
57 65
       matrix_server:
58 66
         ipv4_address: 10.10.10.6
59 67
     depends_on:
60
-      - synapse
61
-
62
-  sliding-sync:
63
-    image: ghcr.io/matrix-org/sliding-sync:v0.99.19
64
-    restart: always
65
-    environment:
66
-      - SYNCV3_BINDADDR=:8008
67
-      - SYNCV3_SERVER=https://DOMAIN
68
-      - SYNCV3_SECRET=SLIDING_SYNC_KEY
69
-      - SYNCV3_DB=user=matrix_synapse dbname=synapse sslmode=disable host=db password=PG_PASS
70
-    networks:
71
-      matrix_server:
72
-        ipv4_address: 10.10.10.7
73
-      matrix_db:
74
-    depends_on:
75
-      - synapse
68
+      synapse:
69
+        condition: service_healthy
76 70
 
77 71
   hydrogen-web:
78
-    image: ghcr.io/element-hq/hydrogen-web:v0.4.1
72
+    image: ghcr.io/element-hq/hydrogen-web:v0.5.1
79 73
     restart: unless-stopped
80 74
     environment:
81 75
       - |

+ 10
- 15
install.sh ファイルの表示

@@ -94,9 +94,10 @@ PG_PASS=$(pwgen -s 28 -1)
94 94
 sed -i "s|DOMAIN|${DOMAIN}|g" "${BASE_DIR}/docker-compose.yaml"
95 95
 sed -i "s|PG_PASS|${PG_PASS}|g" "${BASE_DIR}/docker-compose.yaml"
96 96
 
97
+# Generate synapse file
97 98
 # Generate synapse file
98 99
 echo -e "Generating synapse file..\n"
99
-docker compose run --rm synapse_homeserver --generate-config -H ${DOMAIN} -c /data/homeserver.yaml --report-stats=yes
100
+docker compose run --rm -e SYNAPSE_SERVER_NAME=${DOMAIN} -e SYNAPSE_REPORT_STATS=yes synapse generate
100 101
 
101 102
 # Replace DB config in Synapse's homeserver.yaml
102 103
 echo -e "Configuring homeserver.yaml\n"
@@ -111,6 +112,7 @@ cp /tmp/homeserver.yaml "${BASE_DIR}/config/synapse/homeserver.yaml"
111 112
 
112 113
 # Configure User Directory and TURN
113 114
 cat <<EOF >> "${BASE_DIR}/config/synapse/homeserver.yaml"
115
+public_baseurl: "https://${DOMAIN}"
114 116
 user_directory:
115 117
     enabled: true
116 118
     search_all_users: true
@@ -121,6 +123,7 @@ turn_user_lifetime: 86400000
121 123
 turn_shared_secret: "${TURN_STATIC_SECRET}"
122 124
 turn_uris: [ "turn:${DOMAIN}?transport=udp" ]
123 125
 suppress_key_server_warning: true
126
+enable_authenticated_media: False
124 127
 retention:
125 128
   enabled: true
126 129
   default_policy:
@@ -162,12 +165,6 @@ server {
162 165
     add_header X-Content-Type-Options nosniff;
163 166
     add_header X-Frame-Options "SAMEORIGIN";
164 167
 
165
-    location /.well-known/matrix/client {
166
-        default_type application/json;
167
-        add_header Access-Control-Allow-Origin *;
168
-        return 200 '{"m.homeserver": {"base_url": "https://${DOMAIN}"}, "org.matrix.msc3575.proxy": {"url": "https://${DOMAIN}"}}';
169
-    }
170
-
171 168
     # Admin panel
172 169
     location /admin/ {
173 170
         proxy_pass http://10.10.10.6/;
@@ -186,14 +183,6 @@ server {
186 183
         proxy_http_version 1.1;
187 184
     }
188 185
 
189
-    # Sliding Sync
190
-    location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
191
-        proxy_pass http://10.10.10.7:8008;
192
-        proxy_set_header X-Forwarded-For \$remote_addr;
193
-        proxy_set_header X-Forwarded-Proto \$scheme;
194
-        proxy_set_header Host \$host;
195
-    }
196
-
197 186
     # Synapse Backend
198 187
     location ~ ^(\/_matrix|\/_synapse\/(client|admin)) {
199 188
         # Synapse Container Network IP
@@ -216,6 +205,12 @@ server {
216 205
         proxy_http_version 1.1;
217 206
     }
218 207
 
208
+    location /.well-known/matrix/client {
209
+        default_type application/json;
210
+        add_header Access-Control-Allow-Origin *;
211
+        return 200 '{"m.homeserver": {"base_url": "https://${DOMAIN}"}, "m.identity_server": {"base_url": "https://${DOMAIN}"}}';
212
+    }
213
+
219 214
     # Element Frontend
220 215
     location / {
221 216
         # Element chat Container Network IP

読み込み中…
キャンセル
保存