-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·34 lines (34 loc) · 959 Bytes
/
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
31
32
33
34
#!/bin/sh
# activate maintenance mode
php7.3 artisan down
# update source code
git fetch --all
git reset --hard origin/master
git pull origin master
# update PHP dependencies
composer-php7.3 install --no-interaction --no-dev --prefer-dist
composer-php7.3 update
composer dumpautoload -o
# --no-interaction Do not ask any interactive question
# --no-dev Disables installation of require-dev packages.
# --prefer-dist Forces installation from package dist even for dev versions.
# update database
#php artisan migrate --force
# --force Required to run when in production.
php7.3 artisan migrate --force
# clear and cache config
php7.3 artisan config:cache
# clear and cache route
php7.3 artisan route:cache
# clear and cache view
php7.3 artisan view:cache
# clear and cache events
php7.3 artisan event:cache
# clear bootstrap cache
php7.3 artisan optimize
# install packages
npm install
# webpack build
npm run prod
# stop maintenance mode
php7.3 artisan up