This template sets up a Vagrant virtual machine with the following installed:
- ubuntu/groovy64
- nginx
- PHP 7.2
- MySQL with
root
as the password for the userroot
. - composer
- NPM
There is no “scaffolding” for the web project, only the local environment. See step 7.
This project creates a virtual machine at the IP address 192.168.33.11
. If you want to use another IP address, update the etc/hosts
file and Vagrantfile
before running vagrant up
.
This project uses the domain sandbox.test
. If you want to use another domain replace all instances of sandbox.test
with the desired domain in the instructions below.
This project assumes you use /web
as the root directory for each domain. If you use something else, update lines 11
and 39
in the site-config
script.
git clone [github URL] [local directory name]
If you are using the default IP address and domain add:
192.168.33.11 sandbox.test
vagrant box add ubuntu/groovy64
Make any changes you need to Vagrantfile
, vagrant-bootstrap.sh
, and site-config
.
Then:
vagrant up
If you already have a working project, you can include it as a submodule. If you are creating a new web project that will be deployed to another environment, you should create that git repo first and include it as a submodule.
git submodule add [github URL] sandbox.test
You can make a new site repo from this template:
vagrant ssh
sudo /var/www/site-config sandbox.test
exit
Notes:
- If no directory has been made for the domain, this script will create it with a default
index.php
file. - The root of the domain will be to the
web
directory in the domain folder.