From 955a9c2921c75eaaec411c4ba16926b130b18025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= Date: Mon, 14 Jun 2021 10:07:05 +0200 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20d'un=20pod=20matrix=20avec=20sy?= =?UTF-8?q?napse=20et=20postgres?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- podman-matrix/README.md | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/podman-matrix/README.md b/podman-matrix/README.md index 065790b..d7a0ebf 100644 --- a/podman-matrix/README.md +++ b/podman-matrix/README.md @@ -5,26 +5,44 @@ podman volume create matrixdotorg_synapse-data podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data podman unshare chown -R 991:991 `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data` # 991 est l'UID/GID par défaut de matrix-synapse + podman run -it --name synapse-generate --mount type=volume,src=matrixdotorg_synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=garbaye.fr -e SYNAPSE_REPORT_STATS=no matrixdotorg/synapse generate podman rm synapse-generate + +#postgres +podman pull docker://postgres +podman volume create matrixdotorg_synapse-pgsql + ``` ``` bash # En root : vim /home/podman-matrix/.local/share/containers/storage/volumes/matrixdotorg_synapse-data/_data/homeserver.yaml -53d52 -< public_baseurl: https://qlf-matrix.garbaye.fr -1142d1140 + +< public_baseurl: https://qlf-matrix.garbaye.fr + < enable_registration: false + +< database: +< name: psycopg2 +< user: synapse +< password: mysecretpass +< database: synapse +< host: synapse-db +< port: 5432 +< cp_min: 5 +< cp_max: 10 ``` ``` bash -podman run -d --name synapse --mount type=volume,src=matrixdotorg_synapse-data,dst=/data -p 8086:8008 matrixdotorg/synapse -podman stop synapse -podman start synapse +podman pod create --publish 8086:8008 --name matrix +podman run -d --name synapse-db --pod matrix --mount type=volume,src=matrixdotorg_synapse-pgsql,dst=/var/lib/postgresql/data/synapse -e POSTGRES_PASSWORD=mysecretpass -e POSTGRES_USER=synapse -e POSTGRES_DB=synapse -e POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C" -e PGDATA=/var/lib/postgresql/data/synapse postgres +podman run -d --name synapse --pod matrix --mount type=volume,src=matrixdotorg_synapse-data,dst=/data matrixdotorg/synapse +podman pod stop matrix +podman pod start matrix podman exec -ti synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008 ``` Reste à faire: -Passer à Postgres +Un volume se attaché à synapse-db se crée avec un id unique mais je ne sais pas à quoi il correspond Password policy ? Fédération+redis l 2831 Mettre en place l'enregistrement srv : `_matrix._tcp 86400 IN SRV 5 5 443 matrix` ou le /.well-known/matrix/server (cf https://github.com/matrix-org/synapse/blob/master/docs/delegate.md)