#!/bin/bash

cd /var/www/acermi.com/

# Clean deploy
sudo rm -rf backoffice

#git clone --depth 1 --branch master git@sop-gitlab.cstb.local:siam-back/acermi.git backoffice
git clone --depth 1 --branch master https://gitlab+deploy-token-59:gldt-d3tbHcARsCD9_ZtKuahu@scm.cstb.fr/dti/acermi/back.git backoffice
cd backoffice

# Composer install
composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader

# Change owner and rights
sudo chown administrateur:www-data -R .
#sudo chmod 755 -R .
#sudo chmod 775 -R data
sudo chmod 775 -R .

exit 0;

