Merge remote-tracking branch 'origin/master' into synapse-workers
This commit is contained in:
@ -8,11 +8,11 @@ matrix_postgres_db_name: ""
|
||||
matrix_postgres_base_path: "{{ matrix_base_data_path }}/postgres"
|
||||
matrix_postgres_data_path: "{{ matrix_postgres_base_path }}/data"
|
||||
|
||||
matrix_postgres_docker_image_v9: "postgres:9.6.19-alpine"
|
||||
matrix_postgres_docker_image_v10: "postgres:10.14-alpine"
|
||||
matrix_postgres_docker_image_v11: "postgres:11.9-alpine"
|
||||
matrix_postgres_docker_image_v12: "postgres:12.4-alpine"
|
||||
matrix_postgres_docker_image_v13: "postgres:13.0-alpine"
|
||||
matrix_postgres_docker_image_v9: "docker.io/postgres:9.6.20-alpine"
|
||||
matrix_postgres_docker_image_v10: "docker.io/postgres:10.15-alpine"
|
||||
matrix_postgres_docker_image_v11: "docker.io/postgres:11.10-alpine"
|
||||
matrix_postgres_docker_image_v12: "docker.io/postgres:12.5-alpine"
|
||||
matrix_postgres_docker_image_v13: "docker.io/postgres:13.1-alpine"
|
||||
matrix_postgres_docker_image_latest: "{{ matrix_postgres_docker_image_v13 }}"
|
||||
|
||||
# This variable is assigned at runtime. Overriding its value has no effect.
|
||||
|
@ -69,7 +69,7 @@
|
||||
--cap-drop=ALL
|
||||
--network={{ matrix_docker_network }}
|
||||
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql
|
||||
-v {{ server_path_postgres_dump }}:/{{ server_path_postgres_dump|basename }}:ro
|
||||
--mount type=bind,src={{ server_path_postgres_dump }},dst=/{{ server_path_postgres_dump|basename }},ro
|
||||
--entrypoint=/bin/sh
|
||||
{{ matrix_postgres_docker_image_latest }}
|
||||
-c "cat /{{ server_path_postgres_dump|basename }} |
|
||||
|
@ -79,8 +79,8 @@
|
||||
--cap-drop=ALL
|
||||
--network={{ matrix_docker_network }}
|
||||
--entrypoint=python
|
||||
-v {{ matrix_synapse_config_dir_path }}:/data
|
||||
-v {{ matrix_synapse_config_dir_path }}:/matrix-media-store-parent/media-store
|
||||
-v {{ server_path_homeserver_db }}:/{{ server_path_homeserver_db|basename }}
|
||||
--mount type=bind,src={{ matrix_synapse_config_dir_path }},dst=/data
|
||||
--mount type=bind,src={{ matrix_synapse_config_dir_path }},dst=/matrix-media-store-parent/media-store
|
||||
--mount type=bind,src={{ server_path_homeserver_db }},dst=/{{ server_path_homeserver_db|basename }}
|
||||
{{ matrix_synapse_docker_image }}
|
||||
/usr/local/bin/synapse_port_db --sqlite-database /{{ server_path_homeserver_db|basename }} --postgres-config /data/homeserver.yaml
|
||||
|
@ -85,7 +85,7 @@
|
||||
--network={{ matrix_docker_network }}
|
||||
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql
|
||||
--entrypoint=/bin/sh
|
||||
-v {{ postgres_dump_dir }}:/out
|
||||
--mount type=bind,src={{ postgres_dump_dir }},dst=/out
|
||||
{{ matrix_postgres_detected_version_corresponding_docker_image }}
|
||||
-c "pg_dumpall -h matrix-postgres
|
||||
{{ '| gzip -c ' if postgres_dump_name.endswith('.gz') else '' }}
|
||||
@ -131,7 +131,7 @@
|
||||
--network={{ matrix_docker_network }}
|
||||
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql
|
||||
--entrypoint=/bin/sh
|
||||
-v {{ postgres_dump_dir }}:/in:ro
|
||||
--mount type=bind,src={{ postgres_dump_dir }},dst=/in,ro
|
||||
{{ matrix_postgres_docker_image_latest }}
|
||||
-c "cat /in/{{ postgres_dump_name }} |
|
||||
{{ 'gunzip |' if postgres_dump_name.endswith('.gz') else '' }}
|
||||
|
@ -20,3 +20,8 @@
|
||||
- "matrix_postgres_connection_username"
|
||||
- "matrix_postgres_connection_password"
|
||||
- "matrix_postgres_db_name"
|
||||
|
||||
- name: Fail if Postgres password length exceeded
|
||||
fail:
|
||||
msg: "The maximum `matrix_postgres_connection_password` length is 99 characters"
|
||||
when: "matrix_postgres_connection_hostname|length > 99"
|
||||
|
@ -21,8 +21,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-postgres \
|
||||
-p {{ matrix_postgres_container_postgres_bind_port }}:5432 \
|
||||
{% endif %}
|
||||
--env-file={{ matrix_postgres_base_path }}/env-postgres-server \
|
||||
-v {{ matrix_postgres_data_path }}:/var/lib/postgresql/data:rw \
|
||||
-v /etc/passwd:/etc/passwd:ro \
|
||||
--mount type=bind,src={{ matrix_postgres_data_path }},dst=/var/lib/postgresql/data \
|
||||
--mount type=bind,src=/etc/passwd,dst=/etc/passwd,ro \
|
||||
{% for arg in matrix_postgres_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user