Skip to content
Mike Hingley edited this page Oct 8, 2018 · 1 revision

Homestead development environment

If you want to develop CCHits using a homestead instance to provide web and data hosting, this document will detail some of the things that need to be considered.

Database configuration

Firstly assuming that the database exists and is created - a configuration file will be needed - for databases hosted on homestead, the username should be homestead and the default password is secret.

CCHits database - at the moment - contains configuration information in addition to the configuration file. The fileBase record in the config file should be the homestead based path to the ccHits folder.

Homestead Configuration

Homestead is configured through the homestead.yaml file - here is a version of a homestead.yaml file that @computamike was using to start working on cchits.

I'm working on a macintosh, and store all my code in ~/Code - so for me cchits was in ~/Code/website. I also run my local sites using a .local domain - so for cchits I have a cchits.local address.

Here's a cut down homestead.yaml file.

---
ip: "192.168.10.10"
memory: 4096
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Code
      to: /home/vagrant/Code
      type: nfs
sites:
    - map: cchits.local
      php: "5.6"
      to: /home/vagrant/Code/website


databases:
    - cchits

But I still need to resolve cchits.local - this is done through the hosts file - on mac (and linux) this file is found at /etc/hosts. In there I have an entry like this :

192.168.10.10 cchits.local

This passes all traffic to cchits.local to my homestead server and to nginx.

Dependancy installation on Homestead

Enable Audio :
sudo apt-get install alsa alsa-tools
sudo apt-get install sox
sudo apt-get install festival