File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
php/shared/usr/local/share/assets
spryker/usr/local/share/spryker Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ function assets_apply_database_postgres()
155
155
DATABASE_ARGS+=(" --username=${DATABASE_USER} " )
156
156
fi
157
157
158
+ if [ -n " ${DATABASE_NAME} " ]; then
159
+ DATABASE_ARGS+=(" ${DATABASE_NAME} " )
160
+ fi
161
+
158
162
wait_for_remote_ports " ${ASSETS_DATABASE_WAIT_TIMEOUT} " " ${DATABASE_HOST} :${DATABASE_PORT} "
159
163
160
164
local DATABASES
Original file line number Diff line number Diff line change @@ -49,10 +49,12 @@ do_spryker_app_permissions() {
49
49
50
50
do_spryker_config_create () (
51
51
set +x
52
- echo " Creating Postgres Credentials file in /root/.pgpass"
52
+ local target=~ /.pgpass
53
+
54
+ echo " Creating Postgres Credentials file in " $target
53
55
# 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
56
58
)
57
59
58
60
do_spryker_build () {
@@ -98,7 +100,7 @@ do_spryker_generate_files() {
98
100
do_spryker_install () {
99
101
# check if database exists (it is supposed to be created by postgres container)
100
102
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 "
102
104
DATABASE_EXISTS=$?
103
105
set -e
104
106
@@ -110,7 +112,7 @@ do_spryker_install() {
110
112
# database exists
111
113
# check if spryker is installed
112
114
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
114
116
SPRYKER_INSTALLED=$?
115
117
set -e
116
118
You can’t perform that action at this time.
0 commit comments