2018-04-04 16:25:25 +02:00
|
|
|
#!/bin/bash
|
2018-08-23 15:36:36 +02:00
|
|
|
|
|
|
|
echo "################################";
|
|
|
|
echo "start INSTALL of symfony project";
|
|
|
|
echo "################################";
|
2018-04-04 16:25:25 +02:00
|
|
|
echo "checking requirements";
|
2018-08-28 14:53:05 +02:00
|
|
|
|
|
|
|
sudo apt install acl -y
|
|
|
|
echo "fix file permissions";
|
|
|
|
HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1)
|
|
|
|
|
|
|
|
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
|
|
|
|
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
|
|
|
|
|
|
|
|
sudo npm i -g yarn
|
|
|
|
|
2018-04-04 16:25:25 +02:00
|
|
|
composer --version
|
|
|
|
yarn --version
|
|
|
|
acl --varsion
|
|
|
|
|
2018-08-28 14:53:05 +02:00
|
|
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
|
|
|
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
|
|
|
php composer-setup.php
|
|
|
|
php -r "unlink('composer-setup.php');"
|
|
|
|
|
|
|
|
|
2018-04-04 16:25:25 +02:00
|
|
|
echo "installing symfony project for ubuntu environnement";
|
|
|
|
composer install && yarn install;
|
2018-04-04 16:28:30 +02:00
|
|
|
yarn run encore dev
|
2018-04-04 16:25:25 +02:00
|
|
|
|
|
|
|
echo "update database";
|
|
|
|
php bin/console doctrine:schema:update --dump-sql
|
|
|
|
php bin/console doctrine:schema:update --force
|
2018-08-23 15:36:36 +02:00
|
|
|
|
|
|
|
echo "################################";
|
|
|
|
echo "end INSTALL of symfony project";
|
|
|
|
echo "################################";
|