doc:appunti:linux:sa:matrix
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:matrix [2026/09/03 11:16] – [Migrazione da virtual environment Python a container Docker] niccolo | doc:appunti:linux:sa:matrix [2026/09/15 12:02] (current) – [Avvio del container Docker] niccolo | ||
|---|---|---|---|
| Line 429: | Line 429: | ||
| Viene creata la directory **/ | Viene creata la directory **/ | ||
| + | Nella radice di tale volume si devono copiare i file dalla vecchia installazione: | ||
| + | |||
| + | * **homeserver.yaml** | ||
| + | * **homeserver.signing.key** | ||
| + | * **log.yaml** | ||
| + | |||
| + | È consigliabile rinominare il file **homeserver.signing.key** usando il **SYNAPSE_SERVER_NAME**, | ||
| + | |||
| + | Si devono copiare anche il media store e la directory uploads originali nella radice del volume Docker, con questo mapping: | ||
| + | |||
| + | * **/ | ||
| + | * **/ | ||
| + | |||
| + | I parametri che è necessario aggiustare nel file homeserver.yaml sono: | ||
| + | |||
| + | < | ||
| + | log_config: "/ | ||
| + | media_store_path: | ||
| + | uploads_path: | ||
| + | signing_key_path: | ||
| + | bind_addresses: | ||
| + | - ' | ||
| + | database: | ||
| + | name: " | ||
| + | args: | ||
| + | ... | ||
| + | host: host.docker.internal | ||
| + | port: 5432 | ||
| + | </ | ||
| + | |||
| + | Sulla macchina origine si esegue il dump del database: | ||
| + | |||
| + | < | ||
| + | su - postgres -c " | ||
| + | > synapse-$(hostname)-$(date +%Y-%m-%d).dump | ||
| + | </ | ||
| + | |||
| + | Quindi sulla macchina destinazione si esegue il restore: | ||
| + | |||
| + | |||
| + | ==== Permessi ==== | ||
| + | |||
| + | Verificare che i file di configurazione siano leggibili solo dall' | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | chown 991:991 homeserver.yaml homeserver.signing.key | ||
| + | chmod 0600 homeserver.yaml homeserver.signing.key | ||
| + | </ | ||
| + | |||
| + | FIXME Anche il media_store e la directory uploads devono essere sistemate. | ||
| + | |||
| + | ==== Avvio del container Docker ==== | ||
| + | |||
| + | === Istruzioni generiche === | ||
| + | |||
| + | Le [[https:// | ||
| + | |||
| + | < | ||
| + | docker run -it --rm \ | ||
| + | --mount type=volume, | ||
| + | -e SYNAPSE_SERVER_NAME=my.matrix.host \ | ||
| + | -e SYNAPSE_REPORT_STATS=yes \ | ||
| + | matrixdotorg/ | ||
| + | </ | ||
| + | |||
| + | Questa prima esecuzione rimuove il container subito dopo averlo creato per via dell' | ||
| + | |||
| + | Successivamente si crea il container definitivo, che conterrà l' | ||
| + | |||
| + | < | ||
| + | docker run -d --name synapse \ | ||
| + | --mount type=volume, | ||
| + | -p 8008:8008 \ | ||
| + | matrixdotorg/ | ||
| + | </ | ||
| + | |||
| + | Tale container usa lo stesso volume creato in precedenza (e quindi la configurazione in esso contenuta) e resta in esecuzione. Si possono usare i comandi docker standard per far sì che il container venga avviato automaticamente al bootstrap della macchina, ecc. | ||
| + | |||
| + | === Istruzioni specifiche per la migrazione === | ||
| + | |||
| + | FIXME | ||
| ===== Web References ===== | ===== Web References ===== | ||
doc/appunti/linux/sa/matrix.1788427003.txt.gz · Last modified: by niccolo
