Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #625 from oxyc/docs-update
Browse files Browse the repository at this point in the history
Issue #616: Bring docs up to date [ci skip]
  • Loading branch information
geerlingguy committed May 15, 2016
2 parents 0a41242 + 4fc722e commit 9633ca8
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 14 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This project aims to make spinning up a simple local Drupal test/development environment incredibly quick and easy, and to introduce new developers to the wonderful world of Drupal development on local virtual machines (instead of crufty old MAMP/WAMP-based development).

It will install the following on an Ubuntu 14.04 (by default) linux VM:
It will install the following on an Ubuntu 16.04 (by default) linux VM:

- Apache 2.4.x (or Nginx 1.x)
- PHP 7.0.x (configurable)
Expand Down Expand Up @@ -44,7 +44,7 @@ There are a couple places where you can customize the VM for your needs:
- `config.yml`: Contains variables like the VM domain name and IP address, PHP and MySQL configuration, etc.
- `drupal.make.yml`: Contains configuration for the Drupal core version, modules, and patches that will be downloaded on Drupal's initial installation (more about [Drush make files](https://www.drupal.org/node/1432374)).

If you want to switch from Drupal 8 (default) to Drupal 7 or 6 on the initial install, do the following:
If you want to switch from Drupal 8 (default) to Drupal 7 on the initial install, do the following:

1. Update the Drupal `version` and `core` inside the `drupal.make.yml` file.
2. Update `drupal_major_version` inside `config.yml`.
Expand Down Expand Up @@ -90,18 +90,20 @@ By default, this VM includes the extras listed in the `config.yml` option `insta

installed_extras:
- adminer
# - blackfire
- drupalconsole
- mailhog
- memcached
# - memcached
# - newrelic
# - nodejs
- pimpmylog
# - redis
# - ruby
# - selenium
# - solr
- varnish
- xdebug
- xhprof
# - xdebug
# - xhprof

If you don't want or need one or more of these extras, just delete them or comment them from the list. This is helpful if you want to reduce PHP memory usage or otherwise conserve system resources.

Expand Down
2 changes: 1 addition & 1 deletion docs/extras/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mysql_packages:
- python-mysqldb
```

This set of packages works out of the box with the default Ubuntu 14.04 installation that comes with Drupal VM.
This set of packages works out of the box with Ubuntu 14.04 as well as the default Ubuntu 16.04 installation that comes with Drupal VM.

Alternatively, if you want to use RedHat 7 or CentOS 7 instead of Ubuntu, you can set the following variables to install and configure MariaDB instead of MySQL:

Expand Down
10 changes: 7 additions & 3 deletions docs/extras/scripts.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
Drupal VM allows you to run extra shell scripts at the end of the provisioning process, in case you need to do extra setup, further configure the VM, or install extra software outside the purview of Drupal VM.
Drupal VM allows you to run extra shell scripts in the beginning and at the end of the provisioning process, in case you need to do extra setup, further configure the VM, or install extra software outside the purview of Drupal VM.

To use an extra script, configure the path to the script (relative to `provisioning/playbook.yml`) in `config.yml`:

```yaml
pre_provision_scripts:
- "../scripts/pre-provision.sh"
post_provision_scripts:
- "../scripts/post-provision.sh"
```

The above example results in a `post-provision.sh` script running after the main Drupal VM setup is complete. Post provision scripts run after the first `vagrant up`, and then any time you run Vagrant provisioning (e.g. `vagrant provision` or `vagrant up --provision`).
The above example results in a `pre-provision.sh` script running before the provisioning starts and a `post-provision.sh` script running after the main Drupal VM setup is complete. Pre and post provision scripts run after the first `vagrant up`, and then any time you run Vagrant provisioning (e.g. `vagrant provision` or `vagrant up --provision`).

_Note: The pre provision scripts run before any other packages are installed. If you want to use commands such as `git`, you need to install the packages yourself._

You can define as many scripts as you would like, and any arguments after the path will be passed to the shell script itself (e.g. `"- "../scripts/setup-paths.sh --option"`).

Place your post-provision scripts inside a `scripts` directory in the root of your Drupal VM project directory; this directory is gitignored, so you can continue to update Drupal VM without overwriting your scripts.
Place your pre and post provision scripts inside a `scripts` directory in the root of your Drupal VM project directory; this directory is gitignored, so you can continue to update Drupal VM without overwriting your scripts.
4 changes: 2 additions & 2 deletions docs/extras/varnish.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ In order for Varnish to actually do anything helpful (instead of just pass throu
You will also need to make a few small changes to your site's `settings.php` configuration to make Drupal work correctly behind a reverse proxy like Varnish:

```php
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array('127.0.0.1');
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array('127.0.0.1');
```

If you don't set these values, Drupal will think all requests are coming from `127.0.0.1`. There are other settings you can change to make Drupal not store copies of cached pages in the Database (since Varnish is caching everything, this is redundant), but those other settings are not covered here.
2 changes: 1 addition & 1 deletion docs/other/bigpipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This will disable the `mod_deflate` module for any requests inside that director

If you want to switch Apache to use `mod_php` instead of proxying requests through PHP-FPM, you can make the following changes in `config.yml`:

1. Add `libapache2-mod-php5` to `extra_packages` in `config.yml`.
1. Add `libapache2-mod-php7.0` to `extra_packages` in `config.yml`.
2. Delete the `extra_parameters` under any Drupal site in the list of `apache_vhosts` (so there is no `ProxyPassMatch` rule).

You can also disable PHP-FPM and remove the two `proxy` entries from `apache_mods_enabled` if you don't want to use PHP-FPM with Apache at all, but that's optional; it won't break anything to run Apache with `mod_php` and `mod_proxy_fastcgi` at the same time.
6 changes: 6 additions & 0 deletions docs/other/php-56.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ php_extension_conf_paths:
php_fpm_daemon: php5-fpm
php_fpm_conf_path: "/etc/php5/fpm"
php_mysql_package: php5-mysql
php_memcached_package: php5-memcached

xhprof_download_url: https://github.com/phacility/xhprof/archive/master.tar.gz
xhprof_download_folder_name: xhprof-master
```

If you're using Apache with `mod_php` you should also add `libapache2-mod-php5` to the `php_packages` list.

## RedHat/CentOS 7

Remi's RPM repository is included with Drupal VM, and you can make the following changes to use it to install PHP 5.6 instead of 7:
Expand Down
2 changes: 1 addition & 1 deletion example.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ php_max_input_vars: "4000"

# Drupal VM defaults to using PHP-FPM with either Apache or Nginx. If you wish
# to instead use Apache + mod_php with an Ubuntu base box, make sure you add
# libapache2-mod-php5 to `extra_packages` elsewhere in this config file.
# libapache2-mod-php7.0 to `extra_packages` elsewhere in this config file.
php_enable_php_fpm: true
php_fpm_listen: "127.0.0.1:9000"

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pages:
- 'Debug Code with XDebug': 'extras/xdebug.md'
- 'Catch Emails with MailHog': 'extras/mailhog.md'
- 'Test with Behat and Selenium': 'extras/behat.md'
- 'Add Post-Provision Scripts': 'extras/scripts.md'
- 'Add Pre- and Post-Provision Scripts': 'extras/scripts.md'
- Other Information:
- 'Using Different Base OSes': 'other/base-os.md'
- 'Using Different Webservers': 'other/webservers.md'
Expand Down

0 comments on commit 9633ca8

Please sign in to comment.