Core Site Provisioner
The main site provisioner script.
Overview
A script executed as a provisioner that provisions a site. This includes cloning its provisioner template, installing and processing Nginx config files, running setup scripts, etc This script takes several arguments:
- The name of the site in the config file
- The git repository URI for the site provisioner template
- The git branch to use
- The location inside the guest to set up the site
- Wether to skip provisioning for this site
- The Nginx upstream to use
Index
- vvv_get_site_config_value
- get_config_value
- get_hosts
- get_hosts_list
- get_primary_host
- vvv_custom_folder_composer
- vvv_custom_folder_npm
vvv_get_site_config_value
Retrieves a config value for the given site as specified in config.yml
Arguments
- $1 (string): the config value to fetch
- $2 (string): the default value
get_config_value
Takes 2 values, a key to fetch a value for, and an optional default value
Example
echo $(get_config_value 'key' 'defaultvalue')
Arguments
- $1 (string): the name of the custom parameter
- $2 (string): the default value
See also
get_hosts
Retrieves a list of hosts for this site from the config file. Internally this relies on shyaml get-values-0
Function has no arguments.
Output on stdout
- a space separated string of domains, defaulting to
sitename.test
if none are specified
See also
get_hosts_list
Retrieves a list of hosts for this site from the config file. Internally this relies on shyaml get-values
Function has no arguments.
Output on stdout
- a space separated string of domains, defaulting to
sitename.test
if none are specified
See also
get_primary_host
Retrieves the first host listed for a site.
Function has no arguments.
Output on stdout
- the first host listed in the config file for this site, defaulting to
sitename.test
if none are specified
See also
vvv_custom_folder_composer
Processes a folder sections composer option for a site as specified in config.yml
Arguments
- $1 (string): the folder name to process specified in
config.yml
vvv_custom_folder_npm
Processes a folder sections npm option for a site as specified in config.yml
Arguments
- $1 (string): the folder name to process specified in
config.yml