File tree Expand file tree Collapse file tree
php/shared/usr/local/share/assets
spryker/usr/local/share/spryker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ function assets_apply_database_postgres()
155155 DATABASE_ARGS+=(" --username=${DATABASE_USER} " )
156156 fi
157157
158+ if [ -n " ${DATABASE_NAME} " ]; then
159+ DATABASE_ARGS+=(" ${DATABASE_NAME} " )
160+ fi
161+
158162 wait_for_remote_ports " ${ASSETS_DATABASE_WAIT_TIMEOUT} " " ${DATABASE_HOST} :${DATABASE_PORT} "
159163
160164 local DATABASES
Original file line number Diff line number Diff line change @@ -49,10 +49,12 @@ do_spryker_app_permissions() {
4949
5050do_spryker_config_create () (
5151 set +x
52- echo " Creating Postgres Credentials file in /root/.pgpass"
52+ local target=~ /.pgpass
53+
54+ echo " Creating Postgres Credentials file in " $target
5355 # create .pgpass in home directory for postgres client
54- echo " $DATABASE_HOST :*:*:$DATABASE_USER :$DATABASE_PASSWORD " > /root/.pgpass
55- chmod 0600 /root/.pgpass
56+ echo " $DATABASE_HOST :*:*:$DATABASE_USER :$DATABASE_PASSWORD " > $target
57+ chmod 0600 $target
5658)
5759
5860do_spryker_build () {
@@ -98,7 +100,7 @@ do_spryker_generate_files() {
98100do_spryker_install () {
99101 # check if database exists (it is supposed to be created by postgres container)
100102 set +e
101- psql -U " $DATABASE_USER " -h " $DATABASE_HOST " -lqt | cut -d \| -f 1 | grep -q " $DATABASE_NAME "
103+ psql -U " $DATABASE_USER " -h " $DATABASE_HOST " -lqt " $DATABASE_NAME " | cut -d \| -f 1 | grep -q " $DATABASE_NAME "
102104 DATABASE_EXISTS=$?
103105 set -e
104106
@@ -110,7 +112,7 @@ do_spryker_install() {
110112 # database exists
111113 # check if spryker is installed
112114 set +e
113- psql -U " $DATABASE_USER " -h " $DATABASE_HOST " -c " SELECT EXISTS (SELECT * FROM information_schema.tables WHERE table_catalog = '$DATABASE_NAME ' AND table_name = 'spy_locale');" | grep -q f
115+ psql -U " $DATABASE_USER " -h " $DATABASE_HOST " -c " SELECT EXISTS (SELECT * FROM information_schema.tables WHERE table_catalog = '$DATABASE_NAME ' AND table_name = 'spy_locale');" " $DATABASE_NAME " | grep -q f
114116 SPRYKER_INSTALLED=$?
115117 set -e
116118
You can’t perform that action at this time.
0 commit comments