fix : command dans le container non en local
This commit is contained in:
+10
-13
@@ -105,8 +105,8 @@ then
|
|||||||
cd ../conf
|
cd ../conf
|
||||||
git clone http://code.e-declic.net:3000/jmorin/conf-magento2.git
|
git clone http://code.e-declic.net:3000/jmorin/conf-magento2.git
|
||||||
sudo mv conf-magento2/* .
|
sudo mv conf-magento2/* .
|
||||||
sed -i "s/urlsite/$urlsite/g" *.conf
|
sed -i -e "s/urlsite/$urlsite/g" *.conf
|
||||||
sed -i "s/nomdusite/$nomdusite/g" *.conf
|
sed -i -e "s/nomdusite/$nomdusite/g" *.conf
|
||||||
if [ $installMagento = "local" ];
|
if [ $installMagento = "local" ];
|
||||||
then
|
then
|
||||||
read -p "Emplacement du fichier conf ? (avec / à la fin)" emplacementConf
|
read -p "Emplacement du fichier conf ? (avec / à la fin)" emplacementConf
|
||||||
@@ -129,26 +129,23 @@ then
|
|||||||
ln -s local.conf $emplacementConf$nomdusite.conf
|
ln -s local.conf $emplacementConf$nomdusite.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sed -i "s/fastcgi_backend/$fastcgiPass/g" ../www/nginx.conf.sample
|
sed -i -e "s/fastcgi_backend/$fastcgiPass/g" ../www/nginx.conf.sample
|
||||||
|
|
||||||
cd ../www
|
cd ../www
|
||||||
chgrp -Rin www-data ./*
|
if [ $hostBDD = "localhost" ];
|
||||||
chmod -R 770 var
|
then
|
||||||
chmod -R 770 generation
|
sudo -s -- 'chgrp -R www-data ./*;chmod -R 770 var generation;chmod -R 771 pub;rm -rf var/di/* var/generation/*;php bin/magento deploy:mode:set developer;php bin/magento module:disable Quickshiftin_Assetorderer;php bin/magento setup:static-content:deploy -f fr_FR;php bin/magento setup:static-content:deploy -f en_US;chmod -R 775 pub'
|
||||||
chmod -R 771 pub
|
else
|
||||||
rm -rf var/di/* var/generation/*
|
docker exec -it $dockerPhp bash -c "cd /home/www/$nomdusite/www;chgrp -R www-data ./*;chmod -R 770 var generation;chmod -R 771 pub;rm -rf var/di/* var/generation/*;php bin/magento deploy:mode:set developer;php bin/magento module:disable Quickshiftin_Assetorderer;php bin/magento setup:static-content:deploy -f fr_FR;php bin/magento setup:static-content:deploy -f en_US;chmod -R 775 pub"
|
||||||
php bin/magento deploy:mode:set developer
|
fi
|
||||||
php bin/magento module:disable Quickshiftin_Assetorderer
|
|
||||||
|
|
||||||
if [ $hostBDD = "localhost" ];
|
if [ $hostBDD = "localhost" ];
|
||||||
then
|
then
|
||||||
/Applications/MAMP/Library/bin/mysql -u $identifiantBDD --password=$mdpBDD -e "use $nombase;insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);"
|
/Applications/MAMP/Library/bin/mysql -u $identifiantBDD --password=$mdpBDD -e "use $nombase;insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);"
|
||||||
else
|
else
|
||||||
docker exec -i $hostBDD bash -c "mysql -u $identifiantBDD --password=$mdpBDD -e 'use $nombase;insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);'"
|
docker exec -i $hostBDD bash -c "mysql -u $identifiantBDD --password=$mdpBDD -e 'use $nombase;insert core_config_data (config_id, scope, scope_id, path, value) values (null, \'default\', 0, \'dev/static/sign\', 0);'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ $installMagento = "local" ];
|
if [ $installMagento = "local" ];
|
||||||
then
|
then
|
||||||
sudo -- sh -c -e "echo 'localhost $url' >> /etc/hosts";
|
sudo -- sh -c -e "echo 'localhost $url' >> /etc/hosts";
|
||||||
|
|||||||
Reference in New Issue
Block a user