Explorar el Código

Fix bug in Postgres dump/import causing upgrades to fail

Regression since 3fd6fd647f
pull/27/head
Slavi Pantaleev hace 7 años
padre
commit
a0a4ee526e
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. +4
    -4
      roles/matrix-server/tasks/upgrade_postgres.yml

+ 4
- 4
roles/matrix-server/tasks/upgrade_postgres.yml Ver fichero

@@ -79,10 +79,10 @@
- name: Perform Postgres database dump - name: Perform Postgres database dump
command: | command: |
/usr/bin/docker run --rm --name matrix-postgres-dump \ /usr/bin/docker run --rm --name matrix-postgres-dump \
--link matrix-postgres:postgres \
--network={{ matrix_docker_network }} \
--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 \
{{ matrix_postgres_docker_image_to_use }} pg_dump -h postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }}
{{ matrix_postgres_docker_image_to_use }} pg_dump -h matrix-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
@@ -107,10 +107,10 @@
- name: Perform Postgres database import - name: Perform Postgres database import
command: | command: |
/usr/bin/docker run --rm --name matrix-postgres-import \ /usr/bin/docker run --rm --name matrix-postgres-import \
--link matrix-postgres:postgres \
--network={{ matrix_docker_network }} \
--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 \
{{ matrix_postgres_docker_image_latest }} psql -h postgres -f /in/{{ postgres_dump_name }}
{{ matrix_postgres_docker_image_latest }} psql -h matrix-postgres -f /in/{{ postgres_dump_name }}


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


Cargando…
Cancelar
Guardar