├── .gitignore ├── vvv-hosts ├── vvv-nginx.conf ├── vvv-init.sh └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | htdocs 2 | -------------------------------------------------------------------------------- /vvv-hosts: -------------------------------------------------------------------------------- 1 | # This is the domain for the Bedrock 2 | bedrock.dev -------------------------------------------------------------------------------- /vvv-nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name bedrock.dev; 4 | 5 | # The {vvv_path_to_folder} token gets replaced 6 | # with the folder containing this, e.g. if this 7 | # folder is /srv/www/foo/ and you have a root 8 | # value of `{vvv_path_to_folder}/htdocs` this 9 | # will be auto-magically transformed to 10 | # `/srv/www/foo/htdocs`. 11 | root {vvv_path_to_folder}/htdocs/web/; 12 | 13 | include /etc/nginx/nginx-wp-common.conf; 14 | } 15 | -------------------------------------------------------------------------------- /vvv-init.sh: -------------------------------------------------------------------------------- 1 | # Init script for Keva Apartments 2 | 3 | echo "Commencing Bedrock Setup" 4 | 5 | # Make a database, if we don't already have one 6 | echo "Creating database (if it's not already there)" 7 | mysql -u root --password=root -e "CREATE DATABASE IF NOT EXISTS wordpress_bedrock" 8 | mysql -u root --password=root -e "GRANT ALL PRIVILEGES ON wordpress_bedrock.* TO wp@localhost IDENTIFIED BY 'wp';" 9 | 10 | # Download WordPress 11 | if [ ! -d htdocs ] 12 | then 13 | echo "Installing Bedrock stack using Composer" 14 | composer create-project roots/bedrock htdocs 15 | fi 16 | 17 | # The Vagrant site setup script will restart Nginx for us 18 | 19 | echo "Bedrock site now installed"; 20 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # VVV Auto Bootstrap Demo 1 for VVV Bedrock stack 2 | 3 | This is one of a series of demonstrations of the auto-sitesetup designed to be used with [Varying Vagrants Vagrants](https://github.com/Varying-Vagrant-Vagrants/VVV) for integrating [Bedrock Stack](https://github.com/roots/bedrock). 4 | 5 | This demo shows a site setup using just Composer and MySQL commands. 6 | 7 | To get started: 8 | 9 | 1. If you don't already have it, clone the [Varying Vagrants Vagrants repo](https://github.com/Varying-Vagrant-Vagrants/VVV) , perhaps into your `~/Vagrants/` directory (you may need to create it if it doesn't already exist) 10 | 2. Install the Vagrant hosts updater: `vagrant plugin install vagrant-hostsupdater` 11 | 3. Clone this branch of this repo into the `www` directory of your Vagrant as `www/bedrock`. Command for doing it is `git clone https://github.com/julykaz/vvv-demo-1-bedrock.git bedrock`. 12 | 4. If your Vagrant is running, from the Vagrant directory run `vagrant halt` 13 | 5. Followed by `vagrant up --provision`. Perhaps a cup of tea now? The provisioning may take a while. 14 | 6. Change `.env` file in `htdocs` folder to meet your DB and URL settings from `vvv-init.sh` file. For this default config it is: 15 | `DB_NAME=wordpress_bedrock` 16 | `DB_USER=wp` 17 | `DB_PASSWORD=wp` 18 | `DB_HOST=localhost` 19 | 20 | Then you can visit [http://bedrock.dev/](http://bedrock.dev/) 21 | --------------------------------------------------------------------------------