Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

97 строки
5.7 KiB

  1. matrix_postgres_enabled: true
  2. matrix_postgres_connection_hostname: "matrix-postgres"
  3. matrix_postgres_connection_port: 5432
  4. matrix_postgres_connection_username: "matrix"
  5. matrix_postgres_connection_password: ""
  6. matrix_postgres_db_name: "matrix"
  7. matrix_postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  8. matrix_postgres_data_path: "{{ matrix_postgres_base_path }}/data"
  9. matrix_postgres_architecture: amd64
  10. # matrix_postgres_docker_image_suffix controls whether we use Alpine-based images (`-alpine`) or the normal Debian-based images.
  11. # Alpine-based Postgres images are smaller and we usually prefer them, but they don't work on ARM32 (tested on a Raspberry Pi 3 running Raspbian 10.7).
  12. # On ARM32, `-alpine` images fail with the following error:
  13. # > LOG: startup process (PID 37) was terminated by signal 11: Segmentation fault
  14. matrix_postgres_docker_image_suffix: "{{ '-alpine' if matrix_postgres_architecture in ['amd64', 'arm64'] else '' }}"
  15. matrix_postgres_docker_image_v9: "{{ matrix_container_global_registry_prefix }}postgres:9.6.23{{ matrix_postgres_docker_image_suffix }}"
  16. matrix_postgres_docker_image_v10: "{{ matrix_container_global_registry_prefix }}postgres:10.18{{ matrix_postgres_docker_image_suffix }}"
  17. matrix_postgres_docker_image_v11: "{{ matrix_container_global_registry_prefix }}postgres:11.13{{ matrix_postgres_docker_image_suffix }}"
  18. matrix_postgres_docker_image_v12: "{{ matrix_container_global_registry_prefix }}postgres:12.8{{ matrix_postgres_docker_image_suffix }}"
  19. matrix_postgres_docker_image_v13: "{{ matrix_container_global_registry_prefix }}postgres:13.4{{ matrix_postgres_docker_image_suffix }}"
  20. matrix_postgres_docker_image_v14: "{{ matrix_container_global_registry_prefix }}postgres:14.0{{ matrix_postgres_docker_image_suffix }}"
  21. matrix_postgres_docker_image_latest: "{{ matrix_postgres_docker_image_v14 }}"
  22. # This variable is assigned at runtime. Overriding its value has no effect.
  23. matrix_postgres_docker_image_to_use: '{{ matrix_postgres_docker_image_latest }}'
  24. matrix_postgres_docker_image_force_pull: "{{ matrix_postgres_docker_image_to_use.endswith(':latest') }}"
  25. # A list of extra arguments to pass to the container
  26. matrix_postgres_container_extra_arguments: []
  27. # A list of extra arguments to pass to the postgres process
  28. # e.g. "-c 'max_connections=200'"
  29. matrix_postgres_process_extra_arguments: []
  30. # Controls whether the matrix-postgres container exposes a port (tcp/5432 in the
  31. # container) that can be used to access the database from outside the container (e.g. with psql)
  32. #
  33. # psql postgresql://username:password@localhost:<port>/database_name
  34. #
  35. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:5432"), or empty string to not expose.
  36. matrix_postgres_container_postgres_bind_port: ""
  37. # A list of additional (databases and their credentials) to create.
  38. #
  39. # Example:
  40. # matrix_postgres_additional_databases:
  41. # - name: matrix_appservice_discord
  42. # username: matrix_appservice_discord
  43. # password: some_password
  44. # - name: matrix_appservice_slack
  45. # username: matrix_appservice_slack
  46. # password: some_password
  47. matrix_postgres_additional_databases: []
  48. # A list of roles/users to avoid creating when importing (or upgrading) the database.
  49. # If a dump file contains the roles and they've also been created beforehand (see `matrix_postgres_additional_databases`),
  50. # importing would fail.
  51. # We either need to not create them or to ignore the `CREATE ROLE` statements in the dump.
  52. matrix_postgres_import_roles_to_ignore: [matrix_postgres_connection_username]
  53. matrix_postgres_import_roles_ignore_regex: "^CREATE ROLE ({{ matrix_postgres_import_roles_to_ignore|join('|') }});"
  54. # A list of databases to avoid creating when importing (or upgrading) the database.
  55. # If a dump file contains the databases and they've also been created beforehand (see `matrix_postgres_additional_databases`),
  56. # importing would fail.
  57. # We either need to not create them or to ignore the `CREATE DATABASE` statements in the dump.
  58. matrix_postgres_import_databases_to_ignore: [matrix_postgres_db_name]
  59. matrix_postgres_import_databases_ignore_regex: "^CREATE DATABASE ({{ matrix_postgres_import_databases_to_ignore|join('|') }})\\s"
  60. # The number of seconds to wait after starting `matrix-postgres.service`
  61. # and before trying to run queries for creating additional databases/users against it.
  62. #
  63. # For most (subsequent) runs, Postgres would already be running, so no waiting will be happening at all.
  64. #
  65. # On ARM, we wait some more. ARM32 devices are especially known for being slow.
  66. # ARM64 likely don't need such a long delay, but it doesn't hurt too much having it.
  67. matrix_postgres_additional_databases_postgres_start_wait_timeout_seconds: "{{ 45 if matrix_postgres_architecture in ['arm32', 'arm64'] else 15 }}"
  68. matrix_postgres_pgloader_container_image_self_build: false
  69. matrix_postgres_pgloader_container_image_self_build_repo: "https://github.com/illagrenan/pgloader-docker.git"
  70. matrix_postgres_pgloader_container_image_self_build_repo_branch: "v{{ matrix_postgres_pgloader_docker_image_tag }}"
  71. matrix_postgres_pgloader_container_image_self_build_src_path: "{{ matrix_postgres_base_path }}/pgloader-container-src"
  72. # We use illagrenan/pgloader, instead of the more official dimitri/pgloader image,
  73. # because the official one only provides a `latest` tag.
  74. matrix_postgres_pgloader_docker_image: "{{ matrix_postgres_pgloader_docker_image_name_prefix }}illagrenan/pgloader:{{ matrix_postgres_pgloader_docker_image_tag }}"
  75. matrix_postgres_pgloader_docker_image_name_prefix: "{{ 'localhost/' if matrix_postgres_pgloader_container_image_self_build else matrix_container_global_registry_prefix }}"
  76. matrix_postgres_pgloader_docker_image_tag: "3.6.2"
  77. matrix_postgres_pgloader_docker_image_force_pull: "{{ matrix_postgres_pgloader_docker_image.endswith(':latest') }}"