new: [edit] posgres-database for zato charm
This commit is contained in:
@@ -21,7 +21,7 @@ DATASTORE_ZATO_DIR="$SERVICE_NAME$ZATO_DIR"
|
||||
|
||||
SSH_PASSWORD_FILE="$SERVICE_DATASTORE"/.compose/password/ssh-password
|
||||
DASHBOARD_PASSWORD_FILE="$SERVICE_DATASTORE"/.compose/password/dashboard-password
|
||||
IDE_PASSWORD_FILE="$SERVICE_DATASTORE"/.compose/password/utils-secret
|
||||
IDE_PASSWORD_FILE="$SERVICE_DATASTORE"/.compose/password/ide-password
|
||||
|
||||
ssh_password=$(generate_or_get_secret "$SSH_PASSWORD_FILE")
|
||||
dashboard_password=$(generate_or_get_secret "$DASHBOARD_PASSWORD_FILE")
|
||||
|
14
zato/hooks/postgres_database-relation-joined
Executable file
14
zato/hooks/postgres_database-relation-joined
Executable 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
|
Reference in New Issue
Block a user