Skip to content

Commit

Permalink
Upgrade Homestead, keep defaults to PHP 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 committed Dec 1, 2019
1 parent 79e5500 commit 774180b
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 131 deletions.
2 changes: 2 additions & 0 deletions Homestead.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ folders:
sites:
- map: api.dev.joind.in
to: /home/vagrant/joindin-vm/joindin-api/public
php: "7.3"
- map: dev.joind.in
to: /home/vagrant/joindin-vm/joindin-web2/web
php: "7.3"
databases:
- joindin
name: joindin-vm
12 changes: 4 additions & 8 deletions after.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'joindin'@'%' ID
# Import dev DB
php ~/joindin-vm/joindin-api/tools/dbgen/generate.php | mysql -u homestead -psecret joindin

## Install server applications

# Install Wireshark
sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
install tshark -y
# Set PHP 7.3 on the CLI
sudo update-alternatives --set php /usr/bin/php7.3
sudo update-alternatives --set php-config /usr/bin/php-config7.3
sudo update-alternatives --set phpize /usr/bin/phpize7.3
25 changes: 10 additions & 15 deletions aliases
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ alias h='cd ~'
alias c='clear'
alias art=artisan

alias codecept='vendor/bin/codecept'
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
Expand All @@ -26,30 +27,24 @@ function dusk() {
php artisan dusk "$@"
}

function php71() {
sudo update-alternatives --set php /usr/bin/php7.1
sudo update-alternatives --set php-config /usr/bin/php-config7.1
sudo update-alternatives --set phpize /usr/bin/phpize7.1
}

function php72() {
sudo update-alternatives --set php /usr/bin/php7.2
sudo update-alternatives --set php-config /usr/bin/php-config7.2
sudo update-alternatives --set phpize /usr/bin/phpize7.2
}

function php73() {
sudo update-alternatives --set php /usr/bin/php7.3
sudo update-alternatives --set php-config /usr/bin/php-config7.3
sudo update-alternatives --set phpize /usr/bin/phpize7.3
}

function php74() {
sudo update-alternatives --set php /usr/bin/php7.4
sudo update-alternatives --set php-config /usr/bin/php-config7.4
sudo update-alternatives --set phpize /usr/bin/phpize7.4
}

function serve-apache() {
if [[ "$1" && "$2" ]]
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-apache.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-apache.sh "$1" "$2" 80 443 "${3:-7.1}"
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-apache.sh "$1" "$2" 80 443 "${3:-7.4}"
else
echo "Error: missing required parameters."
echo "Usage: "
Expand All @@ -62,7 +57,7 @@ function serve-laravel() {
then
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-laravel.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-laravel.sh "$1" "$2" 80 443 "${3:-7.1}"
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-laravel.sh "$1" "$2" 80 443 "${3:-7.4}"
else
echo "Error: missing required parameters."
echo "Usage: "
Expand All @@ -74,7 +69,7 @@ function serve-proxy() {
if [[ "$1" && "$2" ]]
then
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/serve-proxy.sh
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-proxy.sh "$1" "$2" 80 443 "${3:-7.1}"
sudo bash /vagrant/vendor/laravel/homestead/scripts/serve-proxy.sh "$1" "$2" 80 443 "${3:-7.4}"
else
echo "Error: missing required parameters."
echo "Usage: "
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
},
"require": {
"laravel/homestead": "^9.0"
"laravel/homestead": "^10.0"
},
"require-dev": {}
}
Loading

0 comments on commit 774180b

Please sign in to comment.