-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·72 lines (50 loc) · 1.78 KB
/
install.sh
File metadata and controls
executable file
·72 lines (50 loc) · 1.78 KB
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
#!/usr/bin/env bash
VALET_HOME="./.valet-home"
WHITE='\033[1;37m'
NC='\033[0m'
echo -e "${WHITE}
Butler (Laravel Valet for Docker)
=================================
This will install Butler (Laravel Valet for Docker)
Although it is a replacement for the original Laravel Valet, it is not a drop-in replacement.
It means you need to disable current running Laravel Valet either by uninstall it or by running valet stop.
If you are not running Laravel Valet, please make sure port 80, 443, 53 inside your MacOS is not in use.
${NC}"
while true; do
read -p "Do you wish to install continue this installation? [Y/n]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
# Ensure that Docker is running...
if ! docker info > /dev/null 2>&1; then
echo -e "${WHITE}Docker is not running.${NC}" >&2
exit 1
fi
mkdir -p www
mkdir -p $VALET_HOME/{CA,Certificates,Drivers,Extensions,Log,Nginx,Sites,dnsmasq.d,dnsmasq-internal.d}
touch $VALET_HOME/Log/nginx-error.log
cp ./valet/cli/stubs/SampleValetDriver.php $VALET_HOME/Drivers/SampleValetDriver.php
# copy config file if not exists
if [ ! -f $VALET_HOME/config.json ]; then
cp ./stubs/config.json $VALET_HOME/config.json
fi
if [ ! -f .env ]; then
cp ./stubs/.env .env
sed -i '' "s|REPLACEME|$PWD/www|g" ./.env
fi
if [ ! -f docker-compose.yaml ]; then
cp ./stubs/docker-compose.yaml ./docker-compose.yaml
fi
sed "s|REPLACEME|$PWD|g" ./bin/butler > ./butler
chmod +x ./butler
mv ./butler /usr/local/bin/butler
echo "Waiting for Butler services to start..."
butler start
docker exec -i -w /valet/master butler_php_1 composer install -vvv
butler install
echo -e "${WHITE}
Please make sure to set 127.0.0.1 inside your DNS setting for custom domain to work
${NC}"