Changeset View
Changeset View
Standalone View
Standalone View
src/.s2i/bin/assemble
Show All 14 Lines | |||||
echo "---> Installing application source..." | echo "---> Installing application source..." | ||||
rm -fR /tmp/src/.git | rm -fR /tmp/src/.git | ||||
mv /tmp/src/* ./ | mv /tmp/src/* ./ | ||||
pushd /opt/app-root/src | pushd /opt/app-root/src | ||||
fix-permissions ./ | fix-permissions ./ | ||||
if [ -f ".env.local" ]; then | |||||
# Ensure there's a line ending | |||||
echo "---->> Append .env.local" | |||||
echo "" >> .env | |||||
cat .env.local >> .env | |||||
fi | |||||
if [ -f "composer.json" ]; then | if [ -f "composer.json" ]; then | ||||
echo "--->> Detected composer.json, running install" | echo "--->> Detected composer.json, running install" | ||||
composer_install | composer_install | ||||
fi | fi | ||||
./artisan horizon:install | ./artisan horizon:install | ||||
if [ ! -z "${OPENEXCHANGERATES_API_KEY}" ]; then | if [ ! -z "${OPENEXCHANGERATES_API_KEY}" ]; then | ||||
./artisan data:import:open-exchange-rates | ./artisan data:import:open-exchange-rates | ||||
fi | fi | ||||
echo "---->> Run npm run prod" | echo "---->> Run npm run prod" | ||||
npm install | npm install | ||||
npm run ${LARAVEL_ENV:=prod} && rm -rf ~/.npm/ | npm run ${LARAVEL_ENV:=prod} && rm -rf ~/.npm/ | ||||
fix-permissions ./ | fix-permissions ./ |