Changeset View
Changeset View
Standalone View
Standalone View
docker/swoole/rootfs/usr/local/bin/build-image
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
#!/bin/bash | |||||
set -x | |||||
set -e | |||||
pwd | |||||
if [ -z "${GIT_URI}" ]; then | |||||
echo "No GIT_URI specified. Exiting." | |||||
exit 1 | |||||
fi | |||||
git clone -b ${GIT_BRANCH:-master} ${GIT_URI} | |||||
cd $(basename ${GIT_URI} .git) | |||||
if [ ! -z "${APP_SRC}" ]; then | |||||
cd ${APP_SRC} | |||||
fi | |||||
if [ -f "composer.json" ]; then | |||||
echo "Detected composer.json, running install" | |||||
php -dmemory_limit=${COMPOSER_MEMORY_LIMIT:--1} /usr/bin/composer install ${COMPOSER_ARGS} | |||||
rm -rf ~/.cache/composer/ | |||||
fi | |||||
if [ -z "${LARAVEL_ENV}" ]; then | |||||
LARAVEL_ENV=prod | |||||
fi | |||||
npm install | |||||
npm run ${LARAVEL_ENV} && rm -rf ~/.npm/ |