Przeglądaj źródła

Moving around DB credentials and dumps

master
Miguel Gagliardo 5 miesięcy temu
rodzic
commit
969187d956
1 zmienionych plików z 8 dodań i 9 usunięć
  1. 8
    9
      install.sh

+ 8
- 9
install.sh Wyświetl plik

@@ -86,9 +86,15 @@ echo -e "Create docker network\n"
86 86
 
87 87
 docker network create --driver=bridge --subnet=10.10.10.0/24 --gateway=10.10.10.1 matrix_server
88 88
 
89
+# Randomly pick a DB password
90
+PG_PASS=$(pwgen -s 28 -1)
91
+
92
+# Replace PG_PASS Password and DOMAIN in docker compose YAML
93
+sed -i "s|DOMAIN|${DOMAIN}|g" "${BASE_DIR}/docker-compose.yaml"
94
+sed -i "s|PG_PASS|${PG_PASS}|g" "${BASE_DIR}/docker-compose.yaml"
95
+
89 96
 # Generate synapse file
90 97
 echo -e "Generating synapse file..\n"
91
-
92 98
 docker compose run --rm -e SYNAPSE_SERVER_NAME=${DOMAIN} -e SYNAPSE_REPORT_STATS=yes synapse generate
93 99
 
94 100
 # Replace DB config in Synapse's homeserver.yaml
@@ -113,18 +119,12 @@ turn_allow_guests: False
113 119
 turn_user_lifetime: 86400000
114 120
 turn_shared_secret: "${TURN_STATIC_SECRET}"
115 121
 turn_uris: [ "turn:${DOMAIN}?transport=udp" ]
122
+suppress_key_server_warning: true
116 123
 EOF
117 124
 
118
-# Randomly pick a DB password
119
-PG_PASS=$(pwgen -s 28 -1)
120
-
121 125
 # Replace Password in homeserver.yaml
122 126
 sed -i "s|PG_PASS|${PG_PASS}|g" "${BASE_DIR}/config/synapse/homeserver.yaml"
123 127
 
124
-# Replace PG_PASS Password and DOMAIN in docker compose YAML
125
-sed -i "s|DOMAIN|${DOMAIN}|g" "${BASE_DIR}/docker-compose.yaml"
126
-sed -i "s|PG_PASS|${PG_PASS}|g" "${BASE_DIR}/docker-compose.yaml"
127
-
128 128
 # Replace Sliding Sync key
129 129
 SLIDING_SYNC_KEY=$(openssl rand -hex 32)
130 130
 sed -i "s|SLIDING_SYNC_KEY|${SLIDING_SYNC_KEY}|g" "${BASE_DIR}/docker-compose.yaml"
@@ -226,5 +226,4 @@ systemctl enable --now coturn
226 226
 
227 227
 # Finally, start services
228 228
 # Ensuring the DB dir is clean before bootstrapping
229
-rm -rf ${BASE_DIR}/db/*
230 229
 systemctl enable --now matrix.service

Ładowanie…
Anuluj
Zapisz