new: [edit] posgres-database for zato charm

This commit is contained in:
Boris Gallet
2024-08-12 15:27:41 +02:00
parent 7ad2f0f103
commit 596ef1eb51
3 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -e
user=$(relation-get user) || exit 1
password="$(relation-get password)" || exit 1
dbname="$(relation-get dbname)" || exit 1
COMPOSE_DIR="$SERVICE_DATASTORE/.compose"
echo "
user:${user}
dbname:${dbname}
password:${password}
" > $COMPOSE_DIR/psql_id