Skip to content

Instantly share code, notes, and snippets.

@kennonb
Last active October 20, 2016 03:36
Show Gist options
  • Save kennonb/8f2fb72a878a7233ac67 to your computer and use it in GitHub Desktop.
Save kennonb/8f2fb72a878a7233ac67 to your computer and use it in GitHub Desktop.
Example Homestead.yaml + after.sh + /etc/hosts
#!/bin/sh
if [ ! -f /usr/local/extra_homestead_software_installed ]; then
echo 'installing some extra software'
#
# Update apt-get
#
apt-get update
#
# install zsh
#
apt-get install zsh -y
#
# install oh my zsh
# (after.sh is run as the root user, but ssh is the vagrant user)
#
git clone git://github.com/robbyrussell/oh-my-zsh.git /home/vagrant/.oh-my-zsh
cp /home/vagrant/.oh-my-zsh/templates/zshrc.zsh-template /home/vagrant/.zshrc
chsh -s /usr/bin/zsh vagrant
#
# remember that the extra software is installed
#
touch /usr/local/extra_homestead_software_installed
else
echo "extra software already installed... moving on..."
fi
alias ..="cd .."
alias ...="cd ../.."
alias lsa="ls -la"
alias artisan='php artisan'
alias art="php artisan"
alias h='cd ~'
alias c='clear'
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
# alias serve=serve-laravel
# function serve-laravel() {
# if [[ "$1" && "$2" ]]
# then
# sudo dos2unix /vagrant/scripts/serve-laravel.sh
# sudo bash /vagrant/scripts/serve-laravel.sh "$1" "$2" 80
# else
# echo "Error: missing required parameters."
# echo "Usage: "
# echo " serve domain path"
# fi
# }
# function serve-hhvm() {
# if [[ "$1" && "$2" ]]
# then
# sudo dos2unix /vagrant/scripts/serve-hhvm.sh
# sudo bash /vagrant/scripts/serve-hhvm.sh "$1" "$2" 80
# else
# echo "Error: missing required parameters."
# echo "Usage: "
# echo " serve-hhvm domain path"
# fi
# }
# function serve-proxy() {
# if [[ "$1" && "$2" ]]
# then
# sudo dos2unix /vagrant/scripts/serve-proxy.sh
# sudo bash /vagrant/scripts/serve-proxy.sh "$1" "$2" 80
# else
# echo "Error: missing required parameters."
# echo "Usage: "
# echo " serve-proxy domain port"
# fi
# }
192.168.10.10 admin.goodnewsocala.com
192.168.10.10 api.goodnewsocala.com
192.168.10.10 connect.goodnewsocala.com
192.168.10.10 new.goodnewsocala.com
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
mariadb: true
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Volumes/Sites/
to: /home/vagrant/Sites
type: "nfs"
sites:
- map: api.cfan.org
to: /home/vagrant/Sites/cfan.new/public
- map: connect.cfan.org
to: /home/vagrant/Sites/cfan.new/public
- map: new.cfan.org
to: /home/vagrant/Sites/cfan.new/public
- map: admin.cfan.org
to: /home/vagrant/Sites/cfan.admin/public
databases:
- cfan
variables:
- key: APP_ENV
value: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment