minor additions

This commit is contained in:
LUXEY Adrien 2020-06-21 19:28:12 +02:00
parent 0400006af1
commit a5eb4c7d9f
3 changed files with 16 additions and 3 deletions

View file

@ -44,6 +44,12 @@ TODO: Ansible task to install that before the rest
* Nginx and docker-compose configurations
* Most of the work is by hand, because there is quite a lot of interaction between the host and the container (for forwarding ssh).
* Create Synapse instances
* Configured to access PostGreSQL on host.
* *Access through TCP*: You need to allow postgres to listen to your docker network, e.g. `172.27.0.0/16`. See `/etc/postgresql/x.y/main/pg_hba.conf`, and read the comments about changing `listen_addresses` too.
* Access through Unix socket: Make a non-superuser role for root, and configure Synapse to use `/var/run/postgresql` as DB host.
### Does not support
@ -72,16 +78,22 @@ TODO: Ansible task to install that before the rest
## Misc
### Synapse
Someone advised me to install matrix-media-repo to enable animated thumbnails as people's avatar (https://github.com/turt2live/matrix-media-repo/blob/master/config.sample.yaml#L394), and to setup https://github.com/ma1uta/ma1sd which is a federated identity server.
### Ansible
* You can create passwords/keys in templates using the following Jinja2 command:
{{ lookup('password', '/dev/null length=20') }}
See https://docs.ansible.com/ansible/latest/plugins/lookup/password.html ans https://docs.ansible.com/ansible/latest/user_guide/playbooks_lookups.html
See https://docs.ansible.com/ansible/latest/plugins/lookup/password.html and https://docs.ansible.com/ansible/latest/user_guide/playbooks_lookups.html
### Useful SQL commands
### Useful MySQL commands
```sql
select host, user, password from mysql.user order by user;

View file

@ -145,6 +145,7 @@ sites:
subnet_gateway_ip: 172.27.7.1
subnet_site_ip: 172.27.7.2
# PostgreSQL
postgres_host: /var/run/postgresql
postgres_database: synapse_test
postgres_username: synapse_test
postgres_password: "{{ vault_synapse_test_postgres_password }}"

View file

@ -633,7 +633,7 @@ database:
user: "{{ site.postgres_username }}"
password: "{{ site.postgres_password }}"
database: "{{ site.postgres_database }}"
host: "{{ site.subnet_gateway_ip }}"
host: "{{ site.postgres_host }}"
cp_min: 5
cp_max: 10