Skip to content

Instantly share code, notes, and snippets.

@nateevans
Last active October 27, 2016 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nateevans/cab3219e526e2997d70b675fdbaccd80 to your computer and use it in GitHub Desktop.
Save nateevans/cab3219e526e2997d70b675fdbaccd80 to your computer and use it in GitHub Desktop.
Config file for Drupal VM - Ubuntu 1404, PHP 5.6
---
# `vagrant_box` can also be set to geerlingguy/centos6, geerlingguy/centos7,
# geerlingguy/ubuntu1404, geerlingguy/ubuntu1204, parallels/ubuntu-14.04, etc.
vagrant_box: geerlingguy/ubuntu1404
vagrant_user: vagrant
vagrant_synced_folder_default_type: nfs
# If you need to run multiple instances of Drupal VM, set a unique hostname,
# machine name, and IP address for each instance.
vagrant_hostname: local.dev
vagrant_vhost_path: /var/www
vagrant_machine_name: drupalvm
vagrant_ip: 192.168.88.88
# Allow Drupal VM to be accessed via a public network interface on your host.
# Vagrant boxes are insecure by default, so be careful. You've been warned!
# See: https://docs.vagrantup.com/v2/networking/public_network.html
vagrant_public_ip: ""
# A list of synced folders, with the keys 'local_path', 'destination', and
# a 'type' of [nfs|rsync|smb] (leave empty for slow native shares). See
# http://docs.drupalvm.com/en/latest/extras/syncing-folders/ for more info.
vagrant_synced_folders:
# BlueSteel Project -------
- local_path: "~/Sites/bluesteel/design-suite-bluesteel"
destination: "{{ vagrant_vhost_path }}/designer"
type: rsync
create: true
excluded_paths: [".idea", ".git", ".sass-cache"]
- local_path: "~/Sites/bluesteel/profile-storefront-develop"
destination: "{{ vagrant_vhost_path }}/profile_storefront_develop"
type: rsync
create: true
excluded_paths: [".idea", ".git", "node_modules", ".sass-cache", "*.scss"]
- local_path: "~/Sites/bluesteel/profile-storefront-edge"
destination: "{{ vagrant_vhost_path }}/profile_storefront_edge"
type: rsync
create: true
excluded_paths: [".idea", "bower_components", ".git", "node_modules", ".sass-cache", "*.scss"]
- local_path: "~/Sites/bluesteel/profile-flightcontrol"
destination: "{{ vagrant_vhost_path }}/profile_flightcontrol"
type: rsync
create: true
excluded_paths: [".idea", ".git", "node_modules", ".sass-cache", "*.scss"]
# TUPSS Project -------
- local_path: "~/Sites/tupss/design-suite-tupss"
destination: "{{ vagrant_vhost_path }}/designer-tupss"
type: rsync
create: true
excluded_paths: [".idea", ".git", ".sass-cache"]
- local_path: "~/Sites/tupss/platform-centers"
destination: "{{ vagrant_vhost_path }}/platform_centers"
type: rsync
create: true
excluded_paths: [".idea", ".git", "node_modules", ".sass-cache", "*.scss"]
- local_path: "~/Sites/tupss/platform-backoffice"
destination: "{{ vagrant_vhost_path }}/platform_backoffice"
type: rsync
create: true
excluded_paths: [".idea", ".git", "node_modules", ".sass-cache", "*.scss"]
# Memory and CPU to use for this VM.
vagrant_memory: 3072
vagrant_cpus: 2
# The web server software to use. Can be either 'apache' or 'nginx'.
drupalvm_webserver: apache
# Set this to false if you are using a different site deployment strategy and
# would like to configure 'vagrant_synced_folders' and 'apache_vhosts' manually.
build_makefile: false
drush_makefile_path: ../../drupal.make.yml
# Set 'build_makefile' to 'false' and this to 'true' if you are using a
# composer based site deployment strategy.
build_composer: false
drupal_composer_path: "{{ config_dir }}/drupal.composer.json"
drupal_composer_install_dir: "/var/www/drupalvm/drupal"
drupal_composer_dependencies:
- "drupal/devel:8.*"
# Set this to 'true' and 'build_makefile', 'build_composer' to 'false' if you
# are using Composer's create-project as a site deployment strategy.
build_composer_project: false
drupal_composer_project_package: "drupal-composer/drupal-project:8.x-dev"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"
# Set this to 'false' if you don't need to install drupal (using the drupal_*
# settings below), but instead copy down a database (e.g. using drush sql-sync).
install_site: false
# Settings for installing a Drupal site (if 'install_site:' is 'true').
drupal_major_version: 8
drupal_core_path: "/var/www/drupalvm/drupal"
drupal_domain: "{{ vagrant_hostname }}"
drupal_site_name: "Drupal"
drupal_install_profile: standard
drupal_enable_modules: [ 'devel' ]
drupal_account_name: admin
drupal_account_pass: admin
drupal_mysql_user: drupal
drupal_mysql_password: drupal
drupal_mysql_database: drupal
# Additional arguments or options to pass to `drush site-install`.
drupal_site_install_extra_args: []
# Cron jobs are added to the vagrant user's crontab. Keys include name
# (required), minute, hour, day, weekday, month, job (required), and state.
drupalvm_cron_jobs: []
# - {
# name: "Drupal Cron",
# minute: "*/30",
# job: "drush -r {{ drupal_core_path }} core-cron"
# }
# Drupal VM automatically creates a drush alias file in your ~/.drush folder if
# this variable is 'true'.
configure_drush_aliases: true
# Apache VirtualHosts. Add one for each site you are running inside the VM. For
# multisite deployments, you can point multiple servernames at one documentroot.
# View the geerlingguy.apache Ansible Role README for more options.
apache_vhosts:
# BlueSteel Project -------
- servername: "designer.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/designer/web"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/designer/web"
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
Include "{{ vagrant_vhost_path }}/designer/app/Resources/apache/vhost/proxy.conf"
- servername: "storefrontdevelop.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/profile_storefront_develop"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/profile_storefront_develop"
- servername: "storefrontedge.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/profile_storefront_edge"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/profile_storefront_edge"
- servername: "flightcontrol.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/profile_flightcontrol"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/profile_flightcontrol"
# TUPSS Project -------
- servername: "designer-tupss.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/designer-tupss/web"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/designer-tupss/web"
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
Include "{{ vagrant_vhost_path }}/designer-tupss/app/Resources/apache/vhost/proxy.conf"
- servername: "center-tupss.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/platform_centers"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/platform_centers"
- servername: "backoffice-tupss.{{ vagrant_hostname }}"
documentroot: "{{ vagrant_vhost_path }}/platform_backoffice"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ vagrant_vhost_path }}/platform_backoffice"
# Extra -------
- servername: "adminer.{{ vagrant_hostname }}"
documentroot: "{{ adminer_install_dir }}"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ adminer_install_dir }}"
- servername: "xhprof.{{ vagrant_hostname }}"
documentroot: "{{ php_xhprof_html_dir }}"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ php_xhprof_html_dir }}"
- servername: "pimpmylog.{{ vagrant_hostname }}"
documentroot: "{{ pimpmylog_install_dir }}"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ pimpmylog_install_dir }}"
- servername: "{{ vagrant_ip }}"
serveralias: "dashboard.{{ vagrant_hostname }}"
documentroot: "{{ dashboard_install_dir }}"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ dashboard_install_dir }}"
DirectoryIndex index.html
apache_remove_default_vhost: true
apache_mods_enabled:
- expires.load
- ssl.load
- rewrite.load
- proxy.load
- proxy_fcgi.load
- proxy_http.load
# Nginx hosts. Each site will get a server entry using the configuration defined
# here. Set the 'is_php' property for document roots that contain PHP apps like
# Drupal.
# nginx_hosts:
# - server_name: "{{ drupal_domain }}"
# root: "{{ drupal_core_path }}"
# is_php: true
# - server_name: "adminer.{{ vagrant_hostname }}"
# root: "{{ adminer_install_dir }}"
# is_php: true
# - server_name: "xhprof.{{ vagrant_hostname }}"
# root: "{{ php_xhprof_html_dir }}"
# is_php: true
# - server_name: "pimpmylog.{{ vagrant_hostname }}"
# root: "{{ pimpmylog_install_dir }}"
# is_php: true
# - server_name: "{{ vagrant_ip }} dashboard.{{ vagrant_hostname }}"
# root: "{{ dashboard_install_dir }}"
# nginx_remove_default_vhost: true
# MySQL Configuration.
mysql_root_password: root
mysql_slow_query_log_enabled: true
mysql_slow_query_time: 2
mysql_wait_timeout: 300
# MySQL Databases and users. If build_makefile: is true, first database will
# be used for the makefile-built site.
mysql_databases:
- name: "flightcontrol"
encoding: utf8
collation: utf8_general_ci
- name: "sfdev"
encoding: utf8
collation: utf8_general_ci
- name: "sfedge"
encoding: utf8
collation: utf8_general_ci
- name: "center_tupss"
encoding: utf8
collation: utf8_general_ci
- name: "backoffice_tupss"
encoding: utf8
collation: utf8_general_ci
- name: "designer"
encoding: utf8
collation: utf8_general_ci
- name: "designer_test"
encoding: utf8
collation: utf8_general_ci
- name: "designer_tupss"
encoding: utf8
collation: utf8_general_ci
mysql_users:
- name: "flightcontrol"
host: "%"
password: "printsites"
priv: "flightcontrol.*:ALL"
- name: "sfdev"
host: "%"
password: "printsites"
priv: "sfdev.*:ALL"
- name: "sfedge"
host: "%"
password: "printsites"
priv: "sfedge.*:ALL"
- name: "center_tupss"
host: "%"
password: "printsites"
priv: "center_tupss.*:ALL"
- name: "backoffice_tupss"
host: "%"
password: "printsites"
priv: "backoffice_tupss.*:ALL"
- name: "designer"
host: "%"
password: "printsites"
priv: "designer.*:ALL"
- name: "designer"
host: "%"
password: "printsites"
priv: "designer_test.*:ALL"
- name: "designertupss"
host: "%"
password: "printsites"
priv: "designer_tupss.*:ALL"
# Comment out any extra utilities you don't want to install. If you don't want
# to install *any* extras, make set this value to an empty set, e.g. `[]`.
installed_extras:
- adminer
# - blackfire
# - drupalconsole
- mailhog
- memcached
# - newrelic
- nodejs
- pimpmylog
# - redis
# - ruby
# - selenium
# - solr
- varnish
- xdebug
- xhprof
# If you install `redis`:
#php_redis_package: php5-redis
# If you install `memcached`:
php_memcached_package: php5-memcached
# If you install `xhprof`:
xhprof_download_url: https://github.com/phacility/xhprof/archive/master.tar.gz
xhprof_download_folder_name: xhprof-master
# Add any extra apt or yum packages you would like installed.
extra_packages:
- sqlite
- unzip
- poppler-utils
- ruby-compass
- pdftk
- supervisor
- python-pip
# `nodejs` must be in installed_extras for this to work. Valid examples: "0.10",
# "0.12", "4.x", "5.x".
nodejs_version: "0.12"
nodejs_npm_global_packages: []
nodejs_install_npm_user: "{{ drupalvm_user }}"
# `ruby` must be in installed_extras for this to work.
ruby_install_gems_user: "{{ drupalvm_user }}"
ruby_install_gems: []
# You can configure almost anything else on the server in the rest of this file.
extra_security_enabled: false
drush_version: "master"
drush_keep_updated: true
drush_composer_cli_options: "--prefer-dist --no-interaction"
firewall_allowed_tcp_ports:
- "22"
- "2222"
- "25"
- "80"
- "81"
- "443"
- "4444"
- "8025"
- "8080"
- "8443"
- "8983"
firewall_log_dropped_packets: false
# PHP Configuration. Currently-supported versions: 5.6, 7.0.
# To use 5.6, see: http://docs.drupalvm.com/en/latest/other/php-56/
php_version: "5.6"
php_memory_limit: "512M"
php_display_errors: "On"
php_display_startup_errors: "On"
php_realpath_cache_size: "1024K"
php_sendmail_path: "/usr/sbin/ssmtp -t"
php_opcache_enabled_in_ini: true
php_opcache_memory_consumption: "192"
php_opcache_max_accelerated_files: 4096
php_max_input_vars: "4000"
php_packages:
- php5
- php5-apcu
- php5-mcrypt
- php5-cli
- php5-common
- php5-curl
- php5-dev
- php5-fpm
- php5-imagick
- php5-intl
- php5-gd
- php5-ldap
- php5-sqlite
- php-pear
- libpcre3-dev
- libapache2-mod-php5
php_conf_paths:
- /etc/php5/fpm
- /etc/php5/apache2
- /etc/php5/cli
php_extension_conf_paths:
- /etc/php5/fpm/conf.d
- /etc/php5/apache2/conf.d
- /etc/php5/cli/conf.d
php_fpm_daemon: php5-fpm
php_fpm_conf_path: "/etc/php5/fpm"
php_fpm_pool_conf_path: "/etc/php5/fpm/pool.d/www.conf"
php_mysql_package: php5-mysql
# 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.
php_enable_php_fpm: true
php_fpm_listen: "127.0.0.1:9000"
composer_path: /usr/bin/composer
composer_home_path: "/home/{{ drupalvm_user }}/.composer"
composer_home_owner: "{{ drupalvm_user }}"
composer_home_group: "{{ drupalvm_user }}"
composer_global_packages:
- { name: hirak/prestissimo, release: '^0.3' }
# Run specified scripts before or after VM is provisioned. Path is relative to
# the `provisioning/playbook.yml` file.
pre_provision_scripts: []
post_provision_scripts: []
# - "../examples/scripts/configure-solr.sh"
adminer_install_filename: index.php
# Varnish Configuration.
varnish_listen_port: "81"
varnish_default_vcl_template_path: templates/drupalvm.vcl.j2
varnish_default_backend_host: "127.0.0.1"
varnish_default_backend_port: "80"
# Pimp my Log settings.
pimpmylog_install_dir: /usr/share/php/pimpmylog
pimpmylog_grant_all_privs: true
# XDebug configuration. XDebug is disabled by default for better performance.
php_xdebug_default_enable: 0
php_xdebug_coverage_enable: 0
php_xdebug_cli_enable: 1
php_xdebug_remote_enable: 1
php_xdebug_remote_connect_back: 1
# Use PHPSTORM for PHPStorm, sublime.xdebug for Sublime Text.
php_xdebug_idekey: nevans-phpstorm
php_xdebug_max_nesting_level: 256
# Solr Configuration (if enabled above).
solr_version: "5.5.1"
solr_xms: "64M"
solr_xmx: "128M"
# Selenium configuration.
selenium_version: 2.46.0
# Other configuration.
dashboard_install_dir: /var/www/dashboard
known_hosts_path: ~/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment