Select Git revision
MiradorMenuButton.js
entrypoint.sh 1.01 KiB
base_dir=/sites/memorekall/www
pushd $base_dir
pushd $base_dir/web_dev
# Install dependencies using local composer not global because of php 5.5
composer install
popd
# Create required dirs
DIRS="web_dev/var/log web_dev/var/cache"
for d in $DIRS; do
mkdir -p $d
done
popd
xdebug_conf="$PHP_INI_DIR/conf.d/xdebug.ini"
npm install
if [ "$ENV" == "prod" ]; then
rm $xdebug_conf
npm run build
else
if [[ "$(uname -r)" =~ "linuxkit" ]]; then
# Connect back does not work in non Linux, deactivate it and use host.docker.internal url
sed -i -e "s/xdebug.discover_client_host=true/xdebug.discover_client_host=false/" $xdebug_conf
echo "" >> $xdebug_conf
echo "xdebug.client_host = host.docker.internal" >> $xdebug_conf
fi
npm run watch &
fi
# Fix permissions
for d in var vendor assets public node_modules legacy log src; do
chown -R :www-data $base_dir/web_dev/$d
chmod -R g+w $base_dir/web_dev/$d
done
chown -R 999:999 $base_dir/web_dev/mysql
apache2ctl -DFOREGROUND