Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120824232
assemble
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
assemble
View Options
#!/bin/bash
set
-x
set
-e
function
composer_install
()
{
echo
"--->> Detected composer.json, running install"
php -dmemory_limit
=
${
COMPOSER_MEMORY_LIMIT
:-
-1
}
/usr/bin/composer install
${
COMPOSER_ARGS
}
rm -rf ~/.cache/composer/
}
shopt
-s dotglob
echo
"--->>
$(
rm -vrf vendor/ composer.lock
)
"
echo
"---> Installing application source..."
rm -fR /tmp/src/.git
mv /tmp/src/* ./
pushd
/opt/app-root/
if
[
-d
"config.
${
LARAVEL_ENV
:-
prod
}
/src/"
]
;
then
find -L
"config.
${
LARAVEL_ENV
:-
prod
}
/src/"
-type f
|
while
read
file
;
do
dir
=
$(
dirname
$file
|
sed -r -e
"s|config.
${
LARAVEL_ENV
:-
prod
}
/src|src|g"
)
if
[
! -d
"
${
dir
}
"
]
;
then
mkdir -p
${
dir
}
fi
cp -av
${
file
}
${
dir
}
/.
done
fi
rm -rf config.*/
pushd
/opt/app-root/src/
rm -rf .env
fix-permissions ./
if
[
-f
"composer.json"
]
;
then
echo
"--->> Detected composer.json, running install"
composer_install
fi
./artisan horizon:install
if
[
! -z
"
${
OPENEXCHANGERATES_API_KEY
}
"
]
;
then
./artisan data:import:open-exchange-rates
fi
echo
"---->> Run npm run prod"
npm install
npm run
${
LARAVEL_ENV
:=prod
}
&&
rm -rf ~/.npm/
fix-permissions ./
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Apr 24, 10:19 AM (7 h, 15 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18896500
Default Alt Text
assemble (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline