PHP/LAMP Usage and Configuration



Search Results

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.

See the Probo.CI Drupal Examples and Demonstrations section below for YAML config examples specific to Drupal. We can also help you get started building your .probo.yaml file.

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
    1
    2
    3
    4
    5
    6
    assets:
      - mydb.sql.gz
    steps:
      - name: Import database
        plugin: LAMPApp
        database: mydb.sql.gz
  • databaseName {string}

    The name of the database to use.

    Example
    1
    2
    3
    4
    steps:
      - name: Set database name
        plugin: LAMPApp
        databaseName: mydb
  • databaseUser {string}

    The username of the database to use.

    Example
    1
    2
    3
    4
    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
    1
    2
    3
    4
    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
    1
    2
    3
    4
    steps:
      - name: Unzip database
        plugin: LAMPApp
        databaseBzipped: true
  • mysqlCnfOptions {hash}

    A hash of MySQL configuration options.

    Example
    1
    2
    3
    4
    5
    6
    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
    1
    2
    3
    4
    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
    1
    2
    3
    4
    5
    6
    7
    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
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    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
    1
    2
    3
    4
    - name: Install ldap in apacheMods.
        plugin: LAMPApp
        apacheMods:
          - ldap
  • restartApache {boolean}

    Whether to restart Apache. If phpIniOptions, phpConstants, phpMods, or apacheMods are set, Apache will be restarted automatically, so you probably won’t need to use this.

    Example
    1
    2
    3
    4
    steps:
      - name: Restart Apache
        plugin: LAMPApp
        restartApache: true

Additional Options

  • composer {boolean}

    If set to true, it will run the composer install command before any databases are imported, configurations synchronized or any drush commands have been run. The composer file will need to be in the root level of your git repository.

    Example
    1
    2
    3
    4
    5
    # Install all dependencies after cloning the git repository.
    steps:
      - name: Import Site Configuration
        plugin: Drupal
        composer: true
  • subDirectory {string}

    The directory of the actual web root (defaults to ‘docroot’).

    Example
    1
    2
    3
    4
    steps:
      - name: Configure web root
        plugin: LAMPApp
        subDirectory: web
  • cliDefines {hash}

    A hash of defines.

    Example
    1
    2
    3
    4
    5
    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
    1
    2
    3
    4
    5
    6
    7
    8
    9
    steps:
      - name: Install optipng in LAMPApp.
        plugin: LAMPApp
        installPackages:
          - optipng
      - name: Check if optipng package is installed.
        plugin: Script
        script: |
          dpkg -l optipng

Demos and Examples

For examples of different ways you can configure Probo.CI for your Drupal application, checkout our Probo Examples & Demonstration page. There you can see pratical real-world examples.

Get Started with Probo.CI

Want to Try Probo today?
Get Started Fast!.

When you sign up for a Probo.CI registration code, you will get a two week trial of the plan of your choosing. For more information on how to get started, click here .

LEARN MORE ABOUT PROBO.CI'S PRICING