install script up

This commit is contained in:
Baptiste Lemoine 2018-08-28 14:53:05 +02:00
parent 945b415998
commit 2c68445a4b
2 changed files with 19 additions and 6 deletions

View File

@ -178,6 +178,8 @@
<div class="col-sm-12 col-lg-5"> <div class="col-sm-12 col-lg-5">
<h2>Simulation sur {{config.lines}} mois</h2> <h2>Simulation sur {{config.lines}} mois</h2>
<div id="simulation-prevision"></div>
<!--block to insert the graph-->
<div class="well" ng-if="config.monthsBeforeNoMoney < config.lines"> <div class="well" ng-if="config.monthsBeforeNoMoney < config.lines">
Ce sera la dèche dans {{config.monthsBeforeNoMoney}} mois Ce sera la dèche dans {{config.monthsBeforeNoMoney}} mois
</div> </div>

View File

@ -4,19 +4,30 @@ echo "################################";
echo "start INSTALL of symfony project"; echo "start INSTALL of symfony project";
echo "################################"; echo "################################";
echo "checking requirements"; echo "checking requirements";
composer --version
yarn --version
acl --varsion
echo "installing symfony project for ubuntu environnement"; sudo apt install acl -y
composer install && yarn install;
yarn run encore dev
echo "fix file permissions"; 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) 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 -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
sudo setfacl -R -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
composer --version
yarn --version
acl --varsion
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');"
echo "installing symfony project for ubuntu environnement";
composer install && yarn install;
yarn run encore dev
echo "update database"; echo "update database";
php bin/console doctrine:schema:update --dump-sql php bin/console doctrine:schema:update --dump-sql
php bin/console doctrine:schema:update --force php bin/console doctrine:schema:update --force