-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·35 lines (26 loc) · 986 Bytes
/
install
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
#!/bin/bash
echo "installing laravel/installer via composer..."
if [[ $(composer global show) != *laravel/installer* ]]
then
composer global require "laravel/installer"
fi
echo "installing laravel..."
laravel new code
echo "setting permissions..."
chmod -R 777 code/storage code/bootstrap/cache
echo "installing docker containers..."
docker-compose up -d
echo "changing working directory to code..."
cd code
echo "installing predis..."
composer require "predis/predis"
echo "installing correct database settings to laravel..."
sed -i '' "s/DB_HOST=127.0.0.1/DB_HOST=mariadb/" .env
sed -i '' "s/DB_DATABASE=homestead/DB_DATABASE=laravel/" .env
sed -i '' "s/DB_USERNAME=homestead/DB_USERNAME=laravel/" .env
sed -i '' "s/REDIS_HOST=127.0.0.1/REDIS_HOST=redis/" .env
sed -i '' "s/CACHE_DRIVER=file/CACHE_DRIVER=redis/" .env
sed -i '' "s/SESSION_DRIVER=file/SESSION_DRIVER=redis/" .env
echo "returning working directory to previous state..."
cd ..
echo "installation complete"