Fix SQLite importing failure
Fixes a problem where importing would lead to this error: Cannot link to /matrix-postgres, as it does not belond to the default network.
This commit is contained in:
parent
b11a4c07a8
commit
bf8023057a
|
@ -49,22 +49,29 @@
|
||||||
- name: Wait a while, so that Postgres can manage to start
|
- name: Wait a while, so that Postgres can manage to start
|
||||||
pause: seconds=7
|
pause: seconds=7
|
||||||
|
|
||||||
|
# If the actual migration command (below) fails, it will leave a container behind.
|
||||||
|
# Starting it again later will relaunch that one, which may or may not work.
|
||||||
|
# To ensure we're starting from a clean state, ensure any such leftovers are removed.
|
||||||
|
- name: Cleanup any old leftover migration container
|
||||||
|
docker_container:
|
||||||
|
name: matrix-synapse-migrate
|
||||||
|
state: absent
|
||||||
|
|
||||||
- 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: "{{ matrix_synapse_docker_image }}"
|
image: "{{ matrix_synapse_docker_image }}"
|
||||||
detach: no
|
detach: no
|
||||||
cleanup: yes
|
cleanup: yes
|
||||||
entrypoint: /usr/bin/python
|
entrypoint: /usr/local/bin/python
|
||||||
command: "/usr/local/bin/synapse_port_db --sqlite-database /scratchpad/homeserver.db --postgres-config /data/homeserver.yaml"
|
command: "/usr/local/bin/synapse_port_db --sqlite-database /scratchpad/homeserver.db --postgres-config /data/homeserver.yaml
|
||||||
user: "{{ matrix_user_uid }}:{{ matrix_user_gid }}"
|
user: "{{ matrix_user_uid }}:{{ matrix_user_gid }}"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ matrix_synapse_config_dir_path }}:/data"
|
- "{{ matrix_synapse_config_dir_path }}:/data"
|
||||||
- "{{ matrix_synapse_run_path }}:/matrix-run"
|
- "{{ matrix_synapse_run_path }}:/matrix-run"
|
||||||
- "{{ matrix_synapse_media_store_path }}:/matrix-media-store"
|
|
||||||
- "{{ matrix_scratchpad_dir }}:/scratchpad"
|
- "{{ matrix_scratchpad_dir }}:/scratchpad"
|
||||||
links:
|
networks:
|
||||||
- "matrix-postgres:{{ matrix_postgres_connection_hostname }}"
|
- name: "{{ matrix_docker_network }}"
|
||||||
|
|
||||||
- name: Ensure scratchpad directory is deleted
|
- name: Ensure scratchpad directory is deleted
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in a new issue