-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-project-stage.sh.example
33 lines (28 loc) · 1.32 KB
/
update-project-stage.sh.example
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
31
32
33
#!/bin/bash
cd "$(dirname "$0")"
docker-compose exec -u webuser -T supervisor supervisorctl stop laravel-schedule laravel-horizon
docker-compose exec -u webuser -T workspace php artisan down
docker-compose exec -u webuser -T workspace php artisan route:clear
docker-compose exec -u webuser -T workspace php artisan config:clear
cd ./src/
git reset --hard
git clean -f -d
git pull
git checkout $1
# git checkout stage
cd ../
docker-compose exec -u webuser -T workspace composer update --no-dev --no-interaction
# docker-compose exec -u webuser -T workspace composer install --no-dev --no-interaction
docker-compose exec -u webuser -T workspace npm install
docker-compose exec -u webuser -T workspace npm run build
# docker-compose exec php composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
# php artisan migrate
docker-compose exec -u webuser -T workspace php artisan migrate --force
docker-compose exec -u webuser -T workspace php artisan db:seed --force
# cache functions
# docker-compose exec -u webuser -T workspace php artisan config:cache
# docker-compose exec -u webuser -T workspace php artisan route:cache
# todo : Other laravel cache here
# ###
docker-compose exec -u webuser -T supervisor supervisorctl start laravel-schedule laravel-horizon
docker-compose exec -u webuser -T workspace php artisan up