This project provides a vagrant machine for development on the ILSCeV/Lara calender and personnel scheduling tool.
- Install Git (Windows)
- Install VirtualBox 5.1
- Install Vagrant 1.9+
- Open a console (e.g., Git Bash on Windows, Terminal on Linux). On Windows: start console with elevated rights (as Administrator)
git clone https://github.com/ILSCeV/homestead-Lara.git
cd homestead-Lara
init-lara.bat
(Window) /./init-lara.sh
(Linux/Mac)vagrant up
- Your Lara Source Code: "homestead-Lara/Code"
- Your Lara Website: http://localhost:8000
- (Use
restart-vm.bat
to restart the machine if needed or after booting the host system) - (Use
destroy.bat
to reset)
- Ensure the VM is running (
vagrant up
). - Open a shell in your Homstead-Lara directory.
- Run
vagrant ssh
to ssh to the VM. - Switch to the Lara directory
cd /home/vagrant/Code/Lara
. - Run
npm run dev
to build*.js
files and themix-manifest.json
.
- If you are on Windows ensure that you do the following steps as an Administrator.
- Open a shell in your Homestead directory and run
vagrant up && vagrant ssh
to ssh to the VM. - Switch to the Lara directory
cd /home/vagrant/Code/Lara
. - Delete old dependencies
rm -r node_modules
. - Install dependencies
sudo npm install
. - Build Javascript/Typescript fiels
npm run dev
.
- Git will be used to download this project and you will use it later to push changes.
- VirtualBox will be used as a virtualisation driver by Vagrant. You will not interact with it directly.
- Vagrant is a nifty tool to make creating and setting up a virtual machine a piece of cake. All you really need is one script file (
Vagrantfile
) which describes how the virtual machine should look and feel (OS, packages, mounts, network, portforwardings,...), the rest is done by Vagrant. magic. - Choose any console you like. On a windows machine, you have to start this console as an administrator (in the start menu, rightclick and choose "Run as Administrator"). This is important as you need elevated rights, so that
npm install
can create symlinks. - This step downloads this project. It is based on homestead, the official Laravel Vagrant-based development environment. The only modifications are in the files
Homestead.yaml
andafter.sh
. - a not so complicated step.
- this will create copies of
Homestead.yaml
andafter.sh
for execution in your personal user folder. Additionally you you will be prompted for the repository and branch to clone from. - This will take some minutes and you will probably get some easily solvable errors. Check out other useful commands for Vagrant. That's what happens:
- Downloads the homestead virtual box.
- The box will be configured according to the
Homestead.yaml
in your personal folder. - The box will boot and at first execute a "provisioner", the script
after.sh
in your personal folder. - The script will download the latest lara-vest source code and will initialize the database.
- After the execution was successful, the virtual machine is active in the background. You can connect and interact with it as with any other virtual machine, you don't have to though.
- Do your modifications here, the folder is autosynced with the virtual machine
- Tadaaa
- The script will basically just power down the VM with
vagrant halt
(if currently booted) and (re-)boot the VM withvagrant up
. - The script will destroy the VM, delete the temporary files and delete your vagrant Code content. Caution: all unpushed changes to your Lara repository will be lost.
The setup was tested under Windows 7 x64 but is supposed to be platform independant.
homestead-Lara
is based on homestead
and the Homestead Vagrant Box.
Both projects are upgraded regulary and because homestead
as well as homestead-Lara
always utilize the latest version of the Homestead Vagrant Box and additional external libraries, homestead-Lara
can behave faulty at any point.
A merge of changes done in homestead
will be needed!
Please open an issue if you believe that an upgrade is needed.