new: [outline] add new charm
This commit is contained in:
18
outline/hooks/postgres_database-relation-joined
Executable file
18
outline/hooks/postgres_database-relation-joined
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PASSWORD="$(relation-get password)"
|
||||
USER="$(relation-get user)"
|
||||
DBNAME="$(relation-get dbname)"
|
||||
|
||||
|
||||
config-add "\
|
||||
services:
|
||||
$MASTER_BASE_SERVICE_NAME:
|
||||
environment:
|
||||
DATABASE_URL: postgres://$USER:$PASSWORD@$TARGET_SERVICE_NAME:5432/$DBNAME
|
||||
PGSSLMODE: disable
|
||||
"
|
||||
|
||||
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."
|
Reference in New Issue
Block a user