#!/bin/bash . lib/common set -e PASSWORD="$(relation-get password)" USER="$(relation-get user)" DBNAME="$(relation-get dbname)" cfg_dir=$(cfg_dir_init) || exit 1 cd "$cfg_dir" || exit 1 cat <> config.php const DB_CONNECTION_STRING = 'pgsql:host=$TARGET_SERVICE_NAME;dbname=$DBNAME;port=5432'; const DB_DRIVER = 'pdo_pgsql'; const DB_NAME = '$DBNAME'; const DB_HOST = '$TARGET_SERVICE_NAME'; const DB_PORT = '5432'; const DB_USER= '$USER'; const DB_PASSWORD = '$PASSWORD'; const TABLENAME_PREFIX = 'fd_'; const MIGRATION_TABLE = 'migration'; EOF