-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy.sh
102 lines (88 loc) · 3.88 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
echo "|=======================================================|"
echo "| |"
echo "| StocksX Deployement script v1.0.0 |"
echo "| |"
echo "| By Abogo Lincoln |"
echo "|=======================================================|"
# checking for requirement
echo "||------------------------------------------------------------------"
echo "||====== Requirement dependencies"
echo "||------------------------------------------------------------------"
echo
echo "[Your php version]"
`php --version`
echo "[Your mysql version]"
`mysql --version`
echo "[Your node version]"
`node --version`
echo "[Your npm version]"
`npm --version`
echo "[Your composer version]"
`composer --version`
echo
# cloning the repo
echo "||------------------------------------------------------------------"
echo "||====== Downloading of the stocksx base"
echo "||------------------------------------------------------------------"
echo
git clone https://github.com/abogo-nono/StocksX.git
echo
echo "||------------------------------------------------------------------"
echo "||====== Download finished!"
echo "||------------------------------------------------------------------"
# changing the current dir
echo "||------------------------------------------------------------------"
echo "||====== Changing current directory to StocksX"
echo "||------------------------------------------------------------------"
cd StocksX
# installing php and js dependencies
echo "||------------------------------------------------------------------"
echo "||====== Installing dependencies"
echo "||------------------------------------------------------------------"
composer install
npm install
# Configure the environment
echo "||------------------------------------------------------------------"
echo "||====== Configuring environment variables"
echo "||------------------------------------------------------------------"
mv .env.example .env
# generate app key
echo "||------------------------------------------------------------------"
echo "||====== generate app key"
echo "||------------------------------------------------------------------"
php artisan key:generate
# migrate, seed database and generate roles
echo "||------------------------------------------------------------------"
echo "||====== Migrate, Seed database and generatre roles and permission"
echo "||------------------------------------------------------------------"
php artisan migrate --seed
# create a the super admain user
php artisan make:filament-user --name=Admin [email protected] --password=12345
php artisan shield:super-admin --user=1
echo "||------------------------------------------------------------------"
echo "||====== Here are your credentials"
echo "||------------------------------------------------------------------"
echo "Username: [email protected]"
echo "Password: 12345"
echo
echo "By default this user will be the superadmin on the app"
# linking the storage folder
echo "||------------------------------------------------------------------"
echo "||====== linking the storage folder"
echo "||------------------------------------------------------------------"
php artisan storage:link
# generating politicise for all resources and first user role
echo "||------------------------------------------------------------------"
echo "||====== Generate roles"
echo "||------------------------------------------------------------------"
php artisan shield:install --fresh
echo "||------------------------------------------------------------------"
echo "||====== Serving the app"
echo "||------------------------------------------------------------------"
echo "Username: [email protected]"
echo "Password: 12345678"
echo
echo "By default this user will be the superadmin on the app"
php artisan serve
# By Abogo Lincoln