LAMP

LAMP is a common technology stack designed to run php applications. It specifically means Linux, Apache MySQL and PHP but is usually generalized to include other webservers like nginx and other SQL relational databases such as postgres or sqlite.

You can easily boot up a LAMP stack for your app by adding the following to your app's .lando.yml.

name: myapp
recipe: lamp

But you likely want to configure this more.

Getting Started

This documentation is geared towards configuring the .lando.yml for the lamp recipe. If you just want to learn how to get up and running with a lamp app check out our Getting Start With LAMP Guide.

Example .lando.yml

# LAMP recipe example
name: lamp2

# Start with the default LAMP recipe
recipe: lamp

# Configure the LAMP recipe
config:

  # Optionally specify the php version to use.
  #
  # If ommitted this will default to  the latest php version. Consult the `php`
  # service to see what version are available
  #
  # NOTE: that this needs to be wrapped in quotes so that it is a string
  php: '5.6'

  # Optionally specify the location of the webroot relative to your approot.
  #
  # If ommitted this will be your approot itself.
  webroot: www

  # Optionally specify the database type, this can be one of:
  #
  #   - `mysql`
  #   - `mariadb`
  #   - `postgres`
  #
  # If ommitted this will default to the latest mysql. You can additionally provide
  # a version with `type:version` but you will need to consult the documentation
  # for the correct DB service to see what versions are available
  database: mysql

  # Optionally activate xdebug
  #
  # If you are having trouble getting xdebug to work please see:
  # https://docs.devwithlando.io/services/php.html#using-xdebug
  xdebug: true

  # Optionally mix in your own config files
  #
  # If ommitted this will use "sane defaults" for your recipe type
  conf:

    # For more information on setting these files check out the documentation
    # and examples
    #
    # Docs: https://docs.devwithlando.io/services/php.html
    # Examples: https://github.com/lando/lando/tree/master/examples
    #
    server: config/lamp.conf
    php: config/php.ini

    # For more information on setting these files check out the documentation
    # and examples for the relevant services:
    #
    # MySQL: https://docs.devwithlando.io/services/mysql.html
    # MariaDB: https://docs.devwithlando.io/services/mariadb.html
    # PostGres: https://docs.devwithlando.io/services/postgres.html
    #
    # Examples: https://github.com/lando/lando/tree/master/examples
    #
    database: config/mysql

You will need to rebuild your app with lando rebuild to apply the changes to this file. You can check out the full code for this example over here.

Advanced Configuration

If you are looking to add additional services, tooling or proxy config check out the Custom Recipe Guide.

results matching ""

    No results matching ""