-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDEPLOY.sh
76 lines (57 loc) · 1.33 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
echo "This application requires httpd, php, composer, mysql/mariadb and npm"
if ! command -v php &> /dev/null; then
echo "php no okay"
set -e
ls /nonexistent_directory
else
echo "php okay"
fi
if ! command -v composer &> /dev/null; then
echo "composer no okay"
set -e
ls /nonexistent_directory
else
echo "composer okay"
fi
if ! command -v npm &> /dev/null; then
echo "npm no okay"
set -e
ls /nonexistent_directory
else
echo "npm okay"
fi
if ! command -v nano &> /dev/null; then
echo "nano no okay"
set -e
ls /nonexistent_directory
else
echo "nano okay"
fi
# Verificar que los servicios están en ejecución
if ! systemctl is-active --quiet httpd; then
echo "httpd no okay"
set -e
ls /nonexistent_directory
else
echo "httpd okay"
fi
if ! systemctl is-active --quiet mariadb; then
echo "mariadb no okay"
set -e
ls /nonexistent_directory
else
echo "mariadb okay"
fi
# Continuar con el resto del código
echo "Everything is fine!"
composer install
npm install
npm audit fix
cp .env.example .env
cp examples/* storage/app/public/
php artisan key:generate
echo "Select the correct timezone, visit for more info https://www.php.net/manual/en/timezones.php"
nano .env
php artisan migrate:fresh --seeder=VirginStartupSeed
php artisan serve