Recreates the DreamHost shared hosting environment as a Vagrant box.
This project repo is for building the Dreambox base box. To use this box in a project, see the usage instructions below.
- Ubuntu -
12.04 LTS
- PHP -
5.6.10
- Apache -
2.2.22
(CGI/FastCGI) - MySQL -
5.5.40
Python and Ruby environments are not set up. Contributions are welcome and appreciated.
Initialize a new project using this box by running the following commands:
vagrant init goodguyry/dreambox
vagrant up
To use this box with an existing project, use the following in your Vagrantfile:
config.vm.box = "goodguyry/dreambox"
config.vm.box_url = "https://atlas.hashicorp.com/goodguyry/boxes/dreambox"
DreamBox is meant to replicate both the hosting environment and the shared hosting setup (the full path to the web root). The user_setup
script is provided to create the user directory and link the project root in your Vagrant sync folder to your new web root.
The user_setup
script should be automated as part of your provisioning. Pass environment variables to the provisioner as follows, changing the variable values to reflect your needs.
# Environment variables for automating user_setup
user_vars = {
"DREAMBOX_USER_NAME" => "db_user", # DreamHost username
"DREAMBOX_SITE_ROOT" => "dreambox.com", # Site root directory
"DREAMBOX_PROJECT_DIR" => "/web" # Relative to project root
}
# Runs user_setup
config.vm.provision "shell",
inline: "/bin/bash /usr/local/bin/user_setup",
# Pass user_setup ENV variables to this script
:env => user_vars
Alternatively, if you'd rather not commit this information to a public repo, run user_setup
from within the VM and follow the prompts.
vagrant up
vagrant ssh
sudo user_setup
To set a password for the root mysql user, run mysql_secure_installation
from within the VM.
vagrant up
vagrant ssh
mysql_secure_installation
- http://phpinfo.dreamhosters.com/ (outdated)
- http://wiki.dreamhost.com/Supported_and_unsupported_technologies
Initial release, based on https://github.com/goodguyry/dreambox