Files
elabore-charms/zato/hooks/postgres_database-relation-joined
2024-08-12 15:30:00 +02:00

15 lines
271 B
Bash
Executable File

#!/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