-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
30 lines (23 loc) · 1.11 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
REPO_PATH="/home/michal/educa-sis"
if [[ ! -d "${REPO_PATH}" ]]; then
git clone https://github.com/mdobes/educa-sis "${REPO_PATH}"
fi
sudo docker exec web-educasis php artisan down --secret="secret-key"
cd "${REPO_PATH}" &&
git clean -fd &&
git checkout -- . &&
git checkout main &&
git reset --hard origin/main &&
git pull
sudo docker-compose -f ${REPO_PATH}/docker-compose.yml up --build -d --force-recreate
sudo docker exec -e COMPOSER_MEMORY_LIMIT=-1 web-educasis composer install --no-scripts
sudo docker exec web-educasis composer dump-autoload --optimize --classmap-authoritative
sudo docker exec web-educasis php artisan route:clear
sudo docker exec web-educasis php artisan view:clear
sudo docker exec web-educasis php artisan migrate --force
sudo docker exec web-educasis php artisan ldap:import users --delete-missing
sudo docker exec web-educasis php artisan command:exchangeadobejwt
sudo docker exec web-educasis php artisan command:getazurebearertoken
sudo docker exec web-educasis php artisan command:createadminpermission
sudo chmod -R 0777 ${REPO_PATH}
sudo docker exec web-educasis php artisan up