Skip to content
Ryan Domingue edited this page Jan 8, 2017 · 22 revisions

Getting Started with Dreambox

I recommend starting with the example Vagrantfile and going from there.

# Run this from your project root
curl https://raw.githubusercontent.com/goodguyry/dreambox/master/Vagrantfile-example > Vagrantfile

Dreambox is meant to replicate DreamHost's shared hosting environment. In order to ensure your local setup matches that of your hosting environment, update the $user_vars values in the example Vagrantfile to match your Dreamhost setup.

A user setup script is automatically run by Dreambox during vagrant up. The following Hash must be in your Vagrantfile for Dreambox to provision correctly:

# Environment variables for automating user_setup
$user_vars = {
  'DREAMBOX_USER_NAME' => 'my-user',      # DreamHost username
  'DREAMBOX_SITE_ROOT' => 'example.com',  # Site root directory
  'DREAMBOX_PROJECT_DIR' => 'web'         # Relative to project root
}

In the above example, the web root would be at /home/my-user/example.com.

Other Usage Options

To use this box with an existing project, add the following to your Vagrantfile:

config.vm.box = "goodguyry/dreambox"

- or - initialize a new project using this box by running the following command:

vagrant init goodguyry/dreambox

With either of these last two options, take care to set up your Vagrantfile like the example provided.

MySQL Setup (Optional)

To set a password for the root mysql user, run mysql_secure_installation from within the VM.

vagrant up
vagrant ssh
mysql_secure_installation
Clone this wiki locally