Drupal 7

Drupal 7 is an open source platform and content management system for building amazing digital experiences. It's made by a dedicated community. Anyone can use it, and it will always be free.

You can easily boot up a best practices stack to run and develop Drupal 7 by adding the following to your app's .lando.yml.

name: myapp
recipe: drupal7

But you likely want to configure this more.

Getting Started

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

Example .lando.yml

# Drupal 7 recipe
name: d7

# Start with the default Drupal 7 recipe
recipe: drupal7

# Configure the Drupal 7 recipe
config:

  # See: https://www.drupal.org/docs/7/system-requirements

  # Optionally specify the php version to use.
  #
  # If ommitted this will default to the latest php version supported by Drupal 7.
  # Consult the `php` service to see what versions are available. Note that all
  # such versions may not be supported in Drupal 7 so YMMV.
  #
  # See: https://www.drupal.org/docs/7/system-requirements/php
  #
  # NOTE: that this needs to be wrapped in quotes so that it is a string
  #
  php: '7.0'

  # Optionally specify whether you want to serve drupal via nginx or apache
  #
  # If ommitted this will default to the latest apache
  #
  # See: https://www.drupal.org/docs/7/system-requirements/web-server
  #
  via: nginx

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

  # Optionally specify how you want Lando to handle Drush. There are a few options
  #
  # If omitted this will globally install the latest version of Drush 8, unless
  # you are on php 5.3 in which case Drush 7 will be used.
  #
  # You can also configure it in the following ways:
  #
  # 1. Install via Composer
  #
  # This will install the Drush Launcher (https://github.com/drush-ops/drush-launcher)
  # and will delegate to the site-local version of Drush you've installed with Composer
  # http://docs.drush.org/en/master/install/
  # drush: composer
  #
  # 2. Install Globally
  #
  # This will globally install the corresponding Drush 8 PHAR posted over at
  # https://github.com/drush-ops/drush/releases
  # drush: global:8.1.12
  #
  # This will ATTEMPT to globally install any pre Drush 8 versions via Composer
  # drush: global:~7
  #
  # 3. Specify a path
  #
  # This assumes the user has already installed Drush but wishes to tell Lando where
  # it exists.
  # drush: path:/app/vendor/bin/drush
  #
  # 4. Do nothing
  #
  # This will tell Lando to not do anything, e.g. it's up to the user
  # drush: false
  #
  drush: global:8.1.15

  # 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
  #
  # see: https://www.drupal.org/docs/7/system-requirements/database-server
  #
  database: mariadb:10.1

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