git clone [email protected]:wemakecustom/wmc-dev.git ~/Sites/wmc
cd ~/Sites/wmc
mkdir projects
(Vagrant /media/data/projects directory will be mounted there)mkdir home
(Vagrant home directory will be mounted there)
- Activate in your Bios/EFI if not Intel vt/Amd-v
sudo ./setup/vagrant-host.sh
vagrant up
- Change hostname (optional)
echo 'dev' | sudo tee /etc/hostname
sudo nano /etc/hosts
(Replace ubuntu or whatever hostname bydev.wemakecustom.com dev
)sudo hostname -F /etc/hostname
sudo rsync -av setup/files/ /
sudo rsync -av setup/home/ "${HOME}/"
sudo ./setup/install.sh
sudo ./setup/install-native-ubuntu.sh
ln -sv "${HOME}/Sites/wmc/projects" "${HOME}/wmc-projects"
(~/wmc-projects
must NOT exists)ln -sv "${HOME}/Google Drive/WMC - Repository" "${HOME}/wmc-repository"
(~/wmc-repository
must NOT exists)
- Move your projects in the projects folder, respecting the hierarchy.
- Install LastPass:
setup/install-lastpass.sh
- Run the configure script (
setup/configure.sh
) to personalize. On Vagrant:/vagrant/setup/configure.sh
.
[setup/files/etc/apache2/sites-available/wmc.conf](Apache is configured) to use dev.wemakecustom.com as host.
Your [Vagrantfile](Vagrant has a private IP) of 10.10.10.10
.
A public DNS pointing *.dev.wemakecustom.com
to it already exists.
You may add a public network so your Vagrant will appear on the network, but this is a security risk.
DNSmasq is configured so *.dev.wemakecustom.com
points to 127.0.0.1
Useful commands:
vagrant help Get help
vagrant up Starts and provisions the vagrant environment
vagrant halt Stops the vagrant machine
vagrant ssh Connects to machine via SSH
If your Vagrant does not boot, try uncommenting virtualbox.gui = true
to see the console.
Instead of using vagrant ssh
you may add an alias on your local machine:
vagrant ssh-config --host wmc-dev >> ~/.ssh/config
And then, you may simply ssh wmc-dev
.
The file structure is ./projects/CLIENT/PROJECT
and it translates to http://PROJECT.CLIENT.dev.wemakecustom.com/
Going to http://list.dev.wemakecustom.com/ will provide a list of existing clients/projects.
Vagrant will create a disk in ./data.vdi
and mount it on /media/data
.
This data will survive even if the VM is destroyed.
All your projects will be stored in /media/data/projects
, symlinked to ~/wmc-projects
, in turn symlinked to /var/www/wmc
and exported via NFS.
Vagrant will also mount it in ./projects
so you can access it locally.
~/Google Drive/WMC - Repository
is symlinked (or shared via NFS) to ~/wmc-projects
, this is the shared assets
User : root
Password : root
http://dev.wemakecustom.com/phpmyadmin/ (Vagrant host autologins)
MySQL data is stored on /media/data/mysql. This data will survive even if the VM is destroyed.