Probo provides LAMP (Linux, Apache, MySQL, and PHP) stack configuration options to make it easier to set up your .probo.yaml
file to mimic your production environment. To use the Probo LAMP plugin you must declare plugin: LAMPApp
in your .probo.yaml
file, or add these options to one of the other available LAMP based Probo plugins.
The Probo Drupal plugin, Probo WordPress plugin, and other LAMP based Probo plugins inherit these options. This allows for these configuration options to be easily used in conjunction with those plugins.
Database Configuration
-
database
{string}The file name of the database to import if specified. Note that this database must be added to the assets array separately.
Example
assets: - mydb.sql.gz steps: - name: Import database plugin: LAMPApp database: mydb.sql.gz
-
databaseName
{string}The name of the database to use.
Example
steps: - name: Set database name plugin: LAMPApp databaseName: mydb
-
databaseUser
{string}The username of the database to use.
Example
steps: - name: Set database user plugin: LAMPApp databaseUser: mydbuser
-
databaseGzipped
{boolean}Whether the database was sent gzipped and whether it should therefore be gunzipped before importing.
Example
steps: - name: Unzip database plugin: LAMPApp databaseGzipped: true
-
databaseBzipped
{boolean}Whether the database was sent bzipped and whether it should therefore be bunzipped before importing.
Example
steps: - name: Unzip database plugin: LAMPApp databaseBzipped: true
-
mysqlCnfOptions
{hash}A hash of MySQL configuration options.
Example
steps: - name: Set MySQL options plugin: LAMPApp mysqlCnfOptions: key_buffer_size: 16M max_allowed_packet: 128M
-
restartMysql
{boolean}Whether to restart MySQL. If
mysqlCnfOptions
is set, MySQL will be restarted automatically, so you probably won’t need to use this.Example
steps: - name: Restart MySQL plugin: LAMPApp restartMysql: true
PHP Configuration
-
phpIniOptions
{hash}Probo builds have their own isolated
php.ini
files. Specific PHP options for your build can be modified using the this configuration option.Example
steps: - name: Configure PHP plugin: LAMPApp phpIniOptions: upload_max_filesize: 25M post_max_size: 25M memory_limit: 256M
-
phpConstants
{hash}Define a hash of PHP Constants and they will be available in any PHP script you run in your Probo Build. This setting will overwrite any other
auto_prepend_file
directives in your php.ini.Example
steps: - name: Setup phpConstants for LAMPApp. plugin: LAMPApp phpConstants: DEVUSER: Developer EMAIL: dev@example.com constant_1: example_1 CONSTANT_2: example_2 _constant_3: example_3 _CONSTANT_4: example_4 - name: Test defined constants. plugin: Script script: | cat <<EOT >> /var/www/html/constants-example.php <?php echo DEVUSER; echo EMAIL; echo constant_1; echo CONSTANT_2; echo _constant_3; echo _CONSTANT_4; ?> EOT echo "View defined constants at $BUILD_DOMAIN/constants-example.php"
Apache Configuration
-
apacheMods
{array}An array of Apache modules to enable (should be installed via
installPackages
if needed).Example
- name: Install ldap in apacheMods. plugin: LAMPApp apacheMods: - ldap
-
restartApache
{boolean}Whether to restart Apache. If
phpIniOptions
,phpConstants
,phpMods
, orapacheMods
are set, Apache will be restarted automatically, so you probably won’t need to use this.Example
steps: - name: Restart Apache plugin: LAMPApp restartApache: true
Additional Options
-
subDirectory
{string}The directory of the actual web root (defaults to ‘docroot’).
Example
steps: - name: Configure web root plugin: LAMPApp subDirectory: web
-
cliDefines
{hash}A hash of defines.
Example
steps: - name: Add Defines_1 CLI variable. plugin: LAMPApp cliDefines: Defines_1: example1
-
installPackages
{array}Install additional apt packages in your build on top of the apt packages that come installed on all Probo Docker images.
Example
steps: - name: Install optipng in LAMPApp. plugin: LAMPApp installPackages: - optipng - name: Check if optipng package is installed. plugin: Script script: | dpkg -l optipng
-
varnish
{hash}A hash of options to configure the Varnish HTTP cache.
enable
: A boolean that indicates whether or not to enable Varnish. Defaults to false.pathToVcl
: A string that indicates the path to your Varnish configuration file relative to the container root.Example
steps: - name: Configure Varnish plugin: LAMPApp varnish: enable: true pathToVcl: $SRC_DIR/config.vcl
Probo LAMP Plugin Example examples
Using the LAMPApp
Plugin to Test a PHP/MySQL Based Application
assets:
- mydb.sql.gz
steps:
- name: Probo site setup
plugin: LAMPApp
database: mydb.sql.gz
databaseName: mydb
databaseUser: mydbuser
databaseGzipped: true
mysqlCnfOptions:
key_buffer_size: 16M
max_allowed_packet: 128M
Setting LAMPApp
PHP Configuration Options
assets:
- mydb.sql.gz
steps:
- name: LAMPApp site configuration example.
plugin: LAMPApp
database: mydb.sql.gz
databaseName: example
databaseUser: example
phpIniOptions:
all:
memory_limit: 256M
apache2:
max_execution_time: 60
upload_max_filesize: 25M
post_max_size: 25M
cli:
max_execution_time: 0
Setting LAMPApp
PHP Configuration Options on a Drupal Installation
assets:
- mydb.sql.gz
steps:
- name: Probo site setup
plugin: Drupal
database: mydb.sql.gz
databaseGzipped: true
databaseUpdates: true
revertFeatures: true
phpIniOptions:
all:
memory_limit: 256M
apache2:
max_execution_time: 60
upload_max_filesize: 25M
post_max_size: 25M
cli:
max_execution_time: 0
- name: Generate login link
command: 'drush uli'
Setting LAMPApp
Varnish Configuration Options
steps:
- name: Configure Varnish
plugin: LAMPApp
varnish:
enabled: true
pathToVcl: $SRC_DIR/config.vcl