Просмотр исходного кода

Rename a bunch of playbook variables for better consistency

pull/6/head
Slavi Pantaleev 7 лет назад
Родитель
Сommit
700602eed3
21 измененных файлов: 63 добавлений и 47 удалений
  1. +16
    -0
      CHANGELOG.md
  2. +12
    -12
      roles/matrix-server/defaults/main.yml
  3. +2
    -2
      roles/matrix-server/tasks/import_sqlite_db.yml
  4. +2
    -2
      roles/matrix-server/tasks/setup_coturn.yml
  5. +2
    -2
      roles/matrix-server/tasks/setup_goofys.yml
  6. +2
    -2
      roles/matrix-server/tasks/setup_nginx_proxy.yml
  7. +5
    -5
      roles/matrix-server/tasks/setup_postgres.yml
  8. +2
    -2
      roles/matrix-server/tasks/setup_riot_web.yml
  9. +1
    -1
      roles/matrix-server/tasks/setup_s3fs.yml
  10. +2
    -2
      roles/matrix-server/tasks/setup_synapse.yml
  11. +5
    -5
      roles/matrix-server/tasks/upgrade_postgres.yml
  12. +1
    -1
      roles/matrix-server/templates/nginx-conf.d/matrix-synapse.conf.j2
  13. +1
    -1
      roles/matrix-server/templates/synapse/homeserver.yaml.j2
  14. +2
    -2
      roles/matrix-server/templates/synapse/synapse.log.config.j2
  15. +1
    -1
      roles/matrix-server/templates/systemd/matrix-coturn.service.j2
  16. +1
    -1
      roles/matrix-server/templates/systemd/matrix-goofys.service.j2
  17. +1
    -1
      roles/matrix-server/templates/systemd/matrix-nginx-proxy.service.j2
  18. +1
    -1
      roles/matrix-server/templates/systemd/matrix-postgres.service.j2
  19. +1
    -1
      roles/matrix-server/templates/systemd/matrix-riot-web.service.j2
  20. +1
    -1
      roles/matrix-server/templates/systemd/matrix-synapse.service.j2
  21. +2
    -2
      roles/matrix-server/templates/usr-local-bin/matrix-postgres-cli.j2

+ 16
- 0
CHANGELOG.md Просмотреть файл

@@ -1,6 +1,22 @@
# 2018-08-08 # 2018-08-08




## (BC Break) Renaming playbook variables

The following playbook variables were renamed:

- from `matrix_max_upload_size_mb` to `matrix_synapse_max_upload_size_mb`
- from `matrix_max_log_file_size_mb` to `matrix_synapse_max_log_file_size_mb`
- from `matrix_max_log_files_count` to `matrix_synapse_max_log_files_count`
- from `docker_matrix_image` to `matrix_docker_image_synapse`
- from `docker_nginx_image` to `matrix_docker_image_nginx`
- from `docker_riot_image` to `matrix_docker_image_riot`
- from `docker_goofys_image` to `matrix_docker_image_goofys`
- from `docker_coturn_image` to `matrix_docker_image_coturn`

If you're overriding any of them in your `vars.yml` file, you'd need to change to the new names.


## Renaming Ansible playbook tag ## Renaming Ansible playbook tag


The command for executing the whole playbook has changed. The command for executing the whole playbook has changed.


+ 12
- 12
roles/matrix-server/defaults/main.yml Просмотреть файл

@@ -46,9 +46,9 @@ matrix_synapse_macaroon_secret_key: ""
matrix_synapse_registration_shared_secret: "{{ matrix_synapse_macaroon_secret_key }}" matrix_synapse_registration_shared_secret: "{{ matrix_synapse_macaroon_secret_key }}"
matrix_synapse_form_secret: "{{ matrix_synapse_macaroon_secret_key }}" matrix_synapse_form_secret: "{{ matrix_synapse_macaroon_secret_key }}"


matrix_max_upload_size_mb: 10
matrix_max_log_file_size_mb: 100
matrix_max_log_files_count: 10
matrix_synapse_max_upload_size_mb: 10
matrix_synapse_max_log_file_size_mb: 100
matrix_synapse_max_log_files_count: 10


matrix_postgres_data_path: "{{ matrix_base_data_path }}/postgres" matrix_postgres_data_path: "{{ matrix_base_data_path }}/postgres"
matrix_nginx_proxy_data_path: "{{ matrix_base_data_path }}/nginx-proxy" matrix_nginx_proxy_data_path: "{{ matrix_base_data_path }}/nginx-proxy"
@@ -59,16 +59,16 @@ matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf"
matrix_scratchpad_dir: "{{ matrix_base_data_path }}/scratchpad" matrix_scratchpad_dir: "{{ matrix_base_data_path }}/scratchpad"




docker_postgres_image_v9: "postgres:9.6.9-alpine"
docker_postgres_image_v10: "postgres:10.4-alpine"
docker_postgres_image_latest: "{{ docker_postgres_image_v10 }}"
matrix_docker_image_postgres_v9: "postgres:9.6.9-alpine"
matrix_docker_image_postgres_v10: "postgres:10.4-alpine"
matrix_docker_image_postgres_latest: "{{ matrix_docker_image_postgres_v10 }}"


docker_matrix_image: "matrixdotorg/synapse:v0.33.1"
docker_nginx_image: "nginx:1.15.2-alpine"
docker_riot_image: "avhost/docker-matrix-riot:v0.16.0"
docker_s3fs_image: "xueshanf/s3fs:latest"
docker_goofys_image: "cloudproto/goofys:latest"
docker_coturn_image: "instrumentisto/coturn:4.5.0.7"
matrix_docker_image_synapse: "matrixdotorg/synapse:v0.33.1"
matrix_docker_image_nginx: "nginx:1.15.2-alpine"
matrix_docker_image_riot: "avhost/docker-matrix-riot:v0.16.0"
matrix_docker_image_s3fs: "xueshanf/s3fs:latest"
matrix_docker_image_goofys: "cloudproto/goofys:latest"
matrix_docker_image_coturn: "instrumentisto/coturn:4.5.0.7"


# The Docker network that all services would be put into # The Docker network that all services would be put into
matrix_docker_network: "matrix" matrix_docker_network: "matrix"


+ 2
- 2
roles/matrix-server/tasks/import_sqlite_db.yml Просмотреть файл

@@ -52,7 +52,7 @@
- name: Importing SQLite database into Postgres - name: Importing SQLite database into Postgres
docker_container: docker_container:
name: matrix-synapse-migrate name: matrix-synapse-migrate
image: "{{ docker_matrix_image }}"
image: "{{ matrix_docker_image_synapse }}"
detach: no detach: no
cleanup: yes cleanup: yes
entrypoint: /usr/bin/python entrypoint: /usr/bin/python
@@ -69,4 +69,4 @@
- name: Ensure scratchpad directory is deleted - name: Ensure scratchpad directory is deleted
file: file:
path: "{{ matrix_scratchpad_dir }}" path: "{{ matrix_scratchpad_dir }}"
state: absent
state: absent

+ 2
- 2
roles/matrix-server/tasks/setup_coturn.yml Просмотреть файл

@@ -7,7 +7,7 @@


- name: Ensure Coturn image is pulled - name: Ensure Coturn image is pulled
docker_image: docker_image:
name: "{{ docker_coturn_image }}"
name: "{{ matrix_docker_image_coturn }}"


- name: Ensure Coturn configuration path exists - name: Ensure Coturn configuration path exists
file: file:
@@ -39,4 +39,4 @@
- '3478/tcp' # STUN - '3478/tcp' # STUN
- '3478/udp' # STUN - '3478/udp' # STUN
- "{{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}/udp" # TURN - "{{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}/udp" # TURN
when: ansible_os_family == 'RedHat'
when: ansible_os_family == 'RedHat'

+ 2
- 2
roles/matrix-server/tasks/setup_goofys.yml Просмотреть файл

@@ -4,7 +4,7 @@


- name: Ensure Goofys Docker image is pulled - name: Ensure Goofys Docker image is pulled
docker_image: docker_image:
name: "{{ docker_goofys_image }}"
name: "{{ matrix_docker_image_goofys }}"
when: matrix_s3_media_store_enabled when: matrix_s3_media_store_enabled


# This will throw a Permission Denied error if already mounted # This will throw a Permission Denied error if already mounted
@@ -65,6 +65,6 @@


- name: Ensure Goofys Docker image doesn't exist - name: Ensure Goofys Docker image doesn't exist
docker_image: docker_image:
name: "{{ docker_goofys_image }}"
name: "{{ matrix_docker_image_goofys }}"
state: absent state: absent
when: "not matrix_s3_media_store_enabled" when: "not matrix_s3_media_store_enabled"

+ 2
- 2
roles/matrix-server/tasks/setup_nginx_proxy.yml Просмотреть файл

@@ -36,7 +36,7 @@
# #
- name: Ensure nginx Docker image is pulled - name: Ensure nginx Docker image is pulled
docker_image: docker_image:
name: "{{ docker_nginx_image }}"
name: "{{ matrix_docker_image_nginx }}"
when: matrix_nginx_proxy_enabled when: matrix_nginx_proxy_enabled


- name: Allow access to nginx proxy ports in firewalld - name: Allow access to nginx proxy ports in firewalld
@@ -87,4 +87,4 @@
file: file:
path: "/etc/cron.d/matrix-nginx-proxy-periodic-restarter" path: "/etc/cron.d/matrix-nginx-proxy-periodic-restarter"
state: absent state: absent
when: "not matrix_nginx_proxy_enabled"
when: "not matrix_nginx_proxy_enabled"

+ 5
- 5
roles/matrix-server/tasks/setup_postgres.yml Просмотреть файл

@@ -26,21 +26,21 @@


- name: Determine Postgres version to use (default to latest) - name: Determine Postgres version to use (default to latest)
set_fact: set_fact:
docker_postgres_image_to_use: "{{ docker_postgres_image_latest }}"
matrix_docker_image_postgres_to_use: "{{ matrix_docker_image_postgres_latest }}"


- name: Determine Postgres version to use (use 9.x, if detected) - name: Determine Postgres version to use (use 9.x, if detected)
set_fact: set_fact:
docker_postgres_image_to_use: "{{ docker_postgres_image_v9 }}"
matrix_docker_image_postgres_to_use: "{{ matrix_docker_image_postgres_v9 }}"
when: "pg_version.startswith('9.')" when: "pg_version.startswith('9.')"


- debug: - debug:
msg: "NOTE: Your setup is on an old Postgres version ({{ docker_postgres_image_to_use }}), while {{ docker_postgres_image_latest }} is supported. You can upgrade using --tags=upgrade-postgres"
when: "docker_postgres_image_to_use != docker_postgres_image_latest"
msg: "NOTE: Your setup is on an old Postgres version ({{ matrix_docker_image_postgres_to_use }}), while {{ matrix_docker_image_postgres_latest }} is supported. You can upgrade using --tags=upgrade-postgres"
when: "matrix_docker_image_postgres_to_use != matrix_docker_image_postgres_latest"


# Even if we don't run the internal server, we still need this for running the CLI # Even if we don't run the internal server, we still need this for running the CLI
- name: Ensure postgres Docker image is pulled - name: Ensure postgres Docker image is pulled
docker_image: docker_image:
name: "{{ docker_postgres_image_to_use }}"
name: "{{ matrix_docker_image_postgres_to_use }}"


- name: Ensure Postgres environment variables file created - name: Ensure Postgres environment variables file created
template: template:


+ 2
- 2
roles/matrix-server/tasks/setup_riot_web.yml Просмотреть файл

@@ -15,7 +15,7 @@


- name: Ensure riot-web Docker image is pulled - name: Ensure riot-web Docker image is pulled
docker_image: docker_image:
name: "{{ docker_riot_image }}"
name: "{{ matrix_docker_image_riot }}"
when: matrix_riot_web_enabled when: matrix_riot_web_enabled


- name: Ensure Matrix riot-web configured - name: Ensure Matrix riot-web configured
@@ -64,6 +64,6 @@


- name: Ensure riot-web Docker image doesn't exist - name: Ensure riot-web Docker image doesn't exist
docker_image: docker_image:
name: "{{ docker_riot_image }}"
name: "{{ matrix_docker_image_riot }}"
state: absent state: absent
when: "not matrix_riot_web_enabled" when: "not matrix_riot_web_enabled"

+ 1
- 1
roles/matrix-server/tasks/setup_s3fs.yml Просмотреть файл

@@ -23,5 +23,5 @@


- name: Ensure S3fs Docker image doesn't exist - name: Ensure S3fs Docker image doesn't exist
docker_image: docker_image:
name: "{{ docker_s3fs_image }}"
name: "{{ matrix_docker_image_s3fs }}"
state: absent state: absent

+ 2
- 2
roles/matrix-server/tasks/setup_synapse.yml Просмотреть файл

@@ -39,7 +39,7 @@


- name: Ensure Matrix Docker image is pulled - name: Ensure Matrix Docker image is pulled
docker_image: docker_image:
name: "{{ docker_matrix_image }}"
name: "{{ matrix_docker_image_synapse }}"


- name: Check if a Matrix Synapse configuration exists - name: Check if a Matrix Synapse configuration exists
stat: stat:
@@ -51,7 +51,7 @@
- name: Generate initial Matrix config - name: Generate initial Matrix config
docker_container: docker_container:
name: matrix-config name: matrix-config
image: "{{ docker_matrix_image }}"
image: "{{ matrix_docker_image_synapse }}"
detach: no detach: no
cleanup: yes cleanup: yes
command: generate command: generate


+ 5
- 5
roles/matrix-server/tasks/upgrade_postgres.yml Просмотреть файл

@@ -52,16 +52,16 @@


- name: Determine Postgres version to use (default to latest) - name: Determine Postgres version to use (default to latest)
set_fact: set_fact:
docker_postgres_image_to_use: "{{ docker_postgres_image_latest }}"
matrix_docker_image_postgres_to_use: "{{ matrix_docker_image_postgres_latest }}"


- name: Determine Postgres version to use (use 9.x, if detected) - name: Determine Postgres version to use (use 9.x, if detected)
set_fact: set_fact:
docker_postgres_image_to_use: "{{ docker_postgres_image_v9 }}"
matrix_docker_image_postgres_to_use: "{{ matrix_docker_image_postgres_v9 }}"
when: "pg_version.startswith('9.')" when: "pg_version.startswith('9.')"


- name: Abort, if already at latest Postgres version - name: Abort, if already at latest Postgres version
fail: msg="You are already running the latest Postgres version supported. Nothing to do" fail: msg="You are already running the latest Postgres version supported. Nothing to do"
when: "docker_postgres_image_to_use == docker_postgres_image_latest"
when: "matrix_docker_image_postgres_to_use == matrix_docker_image_postgres_latest"


- name: Ensure matrix-synapse is stopped - name: Ensure matrix-synapse is stopped
service: name=matrix-synapse state=stopped service: name=matrix-synapse state=stopped
@@ -81,7 +81,7 @@
--link matrix-postgres:postgres \ --link matrix-postgres:postgres \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \ --env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
-v {{ postgres_dump_dir }}:/out \ -v {{ postgres_dump_dir }}:/out \
{{ docker_postgres_image_to_use }} pg_dump -h postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }}
{{ matrix_docker_image_postgres_to_use }} pg_dump -h postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }}


- name: Ensure matrix-postgres is stopped - name: Ensure matrix-postgres is stopped
service: name=matrix-postgres state=stopped service: name=matrix-postgres state=stopped
@@ -109,7 +109,7 @@
--link matrix-postgres:postgres \ --link matrix-postgres:postgres \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \ --env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
-v {{ postgres_dump_dir }}:/in:ro \ -v {{ postgres_dump_dir }}:/in:ro \
{{ docker_postgres_image_latest }} psql -h postgres -f /in/{{ postgres_dump_name }}
{{ matrix_docker_image_postgres_latest }} psql -h postgres -f /in/{{ postgres_dump_name }}


- name: Delete Postgres database dump file - name: Delete Postgres database dump file
file: file:


+ 1
- 1
roles/matrix-server/templates/nginx-conf.d/matrix-synapse.conf.j2 Просмотреть файл

@@ -53,7 +53,7 @@ server {
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;


client_body_buffer_size 25M; client_body_buffer_size 25M;
client_max_body_size {{ matrix_max_upload_size_mb }}M;
client_max_body_size {{ matrix_synapse_max_upload_size_mb }}M;
proxy_max_temp_file_size 0; proxy_max_temp_file_size 0;
} }
} }

+ 1
- 1
roles/matrix-server/templates/synapse/homeserver.yaml.j2 Просмотреть файл

@@ -257,7 +257,7 @@ media_store_path: "/matrix-storage/media-store"
uploads_path: "/matrix-run/uploads" uploads_path: "/matrix-run/uploads"


# The largest allowed upload size in bytes # The largest allowed upload size in bytes
max_upload_size: "{{ matrix_max_upload_size_mb }}M"
max_upload_size: "{{ matrix_synapse_max_upload_size_mb }}M"


# Maximum number of pixels that will be thumbnailed # Maximum number of pixels that will be thumbnailed
max_image_pixels: "32M" max_image_pixels: "32M"


+ 2
- 2
roles/matrix-server/templates/synapse/synapse.log.config.j2 Просмотреть файл

@@ -15,8 +15,8 @@ handlers:
class: logging.handlers.RotatingFileHandler class: logging.handlers.RotatingFileHandler
formatter: precise formatter: precise
filename: /matrix-run/homeserver.log filename: /matrix-run/homeserver.log
maxBytes: {{ matrix_max_log_file_size_mb * 1024 * 1024 }}
backupCount: {{ matrix_max_log_files_count }}
maxBytes: {{ matrix_synapse_max_log_file_size_mb * 1024 * 1024 }}
backupCount: {{ matrix_synapse_max_log_files_count }}
filters: [context] filters: [context]
console: console:
class: logging.StreamHandler class: logging.StreamHandler


+ 1
- 1
roles/matrix-server/templates/systemd/matrix-coturn.service.j2 Просмотреть файл

@@ -14,7 +14,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-coturn \
-p {{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}:{{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}/udp \ -p {{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}:{{ matrix_coturn_turn_udp_min_port }}-{{ matrix_coturn_turn_udp_max_port }}/udp \
-v {{ matrix_synapse_config_dir_path }}:/matrix-config:ro \ -v {{ matrix_synapse_config_dir_path }}:/matrix-config:ro \
-v {{ matrix_coturn_config_path }}:/turnserver.conf:ro \ -v {{ matrix_coturn_config_path }}:/turnserver.conf:ro \
{{ docker_coturn_image }} \
{{ matrix_docker_image_coturn }} \
-c /turnserver.conf -c /turnserver.conf
ExecStop=-/usr/bin/docker kill matrix-coturn ExecStop=-/usr/bin/docker kill matrix-coturn
ExecStop=-/usr/bin/docker rm matrix-coturn ExecStop=-/usr/bin/docker rm matrix-coturn


+ 1
- 1
roles/matrix-server/templates/systemd/matrix-goofys.service.j2 Просмотреть файл

@@ -18,7 +18,7 @@ ExecStart=/usr/bin/docker run --rm --name %n \
-v {{ matrix_synapse_media_store_path }}:/s3:shared \ -v {{ matrix_synapse_media_store_path }}:/s3:shared \
--env-file={{ matrix_environment_variables_data_path }}/goofys \ --env-file={{ matrix_environment_variables_data_path }}/goofys \
--entrypoint /bin/sh \ --entrypoint /bin/sh \
{{ docker_goofys_image }} \
{{ matrix_docker_image_goofys }} \
-c 'goofys -f --storage-class=STANDARD_IA --region {{ matrix_s3_media_store_region }} --stat-cache-ttl 60m0s --type-cache-ttl 60m0s --dir-mode 0700 --file-mode 0700 {{ matrix_s3_media_store_bucket_name }} /s3' -c 'goofys -f --storage-class=STANDARD_IA --region {{ matrix_s3_media_store_region }} --stat-cache-ttl 60m0s --type-cache-ttl 60m0s --dir-mode 0700 --file-mode 0700 {{ matrix_s3_media_store_bucket_name }} /s3'
TimeoutStartSec=5min TimeoutStartSec=5min
ExecStop=-/usr/bin/docker stop %n ExecStop=-/usr/bin/docker stop %n


+ 1
- 1
roles/matrix-server/templates/systemd/matrix-nginx-proxy.service.j2 Просмотреть файл

@@ -17,7 +17,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-nginx-proxy \
-p 443:443 \ -p 443:443 \
-v {{ matrix_nginx_proxy_confd_path }}:/etc/nginx/conf.d:ro \ -v {{ matrix_nginx_proxy_confd_path }}:/etc/nginx/conf.d:ro \
-v {{ matrix_ssl_certs_path }}:{{ matrix_ssl_certs_path }}:ro \ -v {{ matrix_ssl_certs_path }}:{{ matrix_ssl_certs_path }}:ro \
{{ docker_nginx_image }}
{{ matrix_docker_image_nginx }}
ExecStop=-/usr/bin/docker kill matrix-nginx-proxy ExecStop=-/usr/bin/docker kill matrix-nginx-proxy
ExecStop=-/usr/bin/docker rm matrix-nginx-proxy ExecStop=-/usr/bin/docker rm matrix-nginx-proxy
ExecReload=/usr/bin/docker exec matrix-nginx-proxy /usr/sbin/nginx -s reload ExecReload=/usr/bin/docker exec matrix-nginx-proxy /usr/sbin/nginx -s reload


+ 1
- 1
roles/matrix-server/templates/systemd/matrix-postgres.service.j2 Просмотреть файл

@@ -15,7 +15,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-postgres \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-server-docker \ --env-file={{ matrix_environment_variables_data_path }}/env-postgres-server-docker \
-v {{ matrix_postgres_data_path }}:/var/lib/postgresql/data \ -v {{ matrix_postgres_data_path }}:/var/lib/postgresql/data \
-v /etc/passwd:/etc/passwd:ro \ -v /etc/passwd:/etc/passwd:ro \
{{ docker_postgres_image_to_use }}
{{ matrix_docker_image_postgres_to_use }}
ExecStop=-/usr/bin/docker stop matrix-postgres ExecStop=-/usr/bin/docker stop matrix-postgres
ExecStop=-/usr/bin/docker rm matrix-postgres ExecStop=-/usr/bin/docker rm matrix-postgres
Restart=always Restart=always


+ 1
- 1
roles/matrix-server/templates/systemd/matrix-riot-web.service.j2 Просмотреть файл

@@ -15,7 +15,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-riot-web \
{% if not matrix_nginx_proxy_enabled %} {% if not matrix_nginx_proxy_enabled %}
-p 127.0.0.1:8765:8765 \ -p 127.0.0.1:8765:8765 \
{% endif %} {% endif %}
{{ docker_riot_image }}
{{ matrix_docker_image_riot }}
ExecStop=-/usr/bin/docker kill matrix-riot-web ExecStop=-/usr/bin/docker kill matrix-riot-web
ExecStop=-/usr/bin/docker rm matrix-riot-web ExecStop=-/usr/bin/docker rm matrix-riot-web
Restart=always Restart=always


+ 1
- 1
roles/matrix-server/templates/systemd/matrix-synapse.service.j2 Просмотреть файл

@@ -32,7 +32,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-synapse \
-v {{ matrix_synapse_run_path }}:/matrix-run \ -v {{ matrix_synapse_run_path }}:/matrix-run \
-v {{ matrix_synapse_storage_path }}:/matrix-storage:slave \ -v {{ matrix_synapse_storage_path }}:/matrix-storage:slave \
-e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml \ -e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml \
{{ docker_matrix_image }}
{{ matrix_docker_image_synapse }}
ExecStop=-/usr/bin/docker kill matrix-synapse ExecStop=-/usr/bin/docker kill matrix-synapse
ExecStop=-/usr/bin/docker rm matrix-synapse ExecStop=-/usr/bin/docker rm matrix-synapse
Restart=always Restart=always


+ 2
- 2
roles/matrix-server/templates/usr-local-bin/matrix-postgres-cli.j2 Просмотреть файл

@@ -5,5 +5,5 @@ docker run \
--rm \ --rm \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \ --env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
--network {{ matrix_docker_network }} \ --network {{ matrix_docker_network }} \
{{ docker_postgres_image_to_use }} \
psql -h {{ matrix_postgres_connection_hostname }}
{{ matrix_docker_image_postgres_to_use }} \
psql -h {{ matrix_postgres_connection_hostname }}

Загрузка…
Отмена
Сохранить