mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-17 01:22:26 +00:00
d1f28d17bb
This passes any arguments given to 'matrix-postgres-cli' to the 'psql' command. Examples: $ # start an interactive shell connected to a given db $ sudo matrix-postgres-cli -d synapse $ # run a query, non-interactively $ sudo matrix-postgres-cli -d synapse -c 'SELECT group_id FROM groups;'
14 lines
353 B
Django/Jinja
14 lines
353 B
Django/Jinja
#jinja2: lstrip_blocks: "True"
|
|
#!/bin/bash
|
|
|
|
docker run \
|
|
-it \
|
|
--rm \
|
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
|
--cap-drop=ALL \
|
|
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql \
|
|
--network {{ matrix_docker_network }} \
|
|
{{ matrix_postgres_docker_image_to_use }} \
|
|
psql -h {{ matrix_postgres_connection_hostname }} \
|
|
"$@"
|