-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_deploy.sh
38 lines (26 loc) · 1000 Bytes
/
server_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
35
36
37
38
#!/bin/sh
set -e
echo "Deploying application ..."
# Enter maintenance mode
(php artisan down) || true
# Update codebase
git fetch origin main
git reset --hard origin/main
composer self-update --2
# Verifico Compativilidad https://styde.net/composer-2-0-ya-esta-disponible/
composer check-platform-reqs --no-dev
# Install dependencies based on lock file
composer install --no-interaction --prefer-dist --optimize-autoloader
# Migrate database
php artisan migrate --force
# Note: If you're using queue workers, this is the place to restart them.
# ...
# Clear cache
php artisan optimize
# Reload PHP to update opcache
#echo "" | sudo -S service php8.0-fpm reload #no uso opcache y esta linea genera error porque usa sudo
npm install
npm run dev #TODO: Esta temporalmente con dev porque con prod desaparecen los estilos indigos de los botones
# Exit maintenance mode
php artisan up
echo "Application deployed!"