LEMP

LEMP is a popular LAMP variant that replaces apache with nginx. It specifically means Linux, (E)nginx MySQL and PHP.

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

name: myapp
recipe: lemp

But you likely want to configure this more.

Getting Started

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

Example .lando.yml

# LEMP recipe example
name: lemp2

# Start with the default LEMP recipe
recipe: lemp

# Configure the LEMP 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: '7.1'

  # 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
  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/nginx.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 ""