-
Notifications
You must be signed in to change notification settings - Fork 7
0.2.x
There are several breaking changes in the Vagrantfile requirements for Dreambox 0.2.x
.
-
$user_vars
must now be set outside of theVagrant.configure
object - Dreambox will automatically set the main sync folder for you
- Dreambox will automatically run
user_setup
for you; remove its provision statement from yourv0.2.x
Vagrantfile
See the example Vagrantfile for more.
I recommend starting with the example Vagrantfile and going from there.
# Run this from your project root
curl https://raw.githubusercontent.com/goodguyry/dreambox/v0.2.5-archive/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
"ENABLE_SSL" => true # Defaults to false
'DREAMBOX_SITE_NAME' => 'example.dev', # Use local site's TLD
'DREAMBOX_PUBLIC_SITE_ROOT' => 'public' # Optional path to public folder
}
In the above example, the web root would be at /home/my-user/example.com
.
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.
To set a password for the root mysql user, run mysql_secure_installation
from within the VM.
vagrant up
vagrant ssh
mysql_secure_installation