Platform.sh Lando Plugin

This is the official Landoopen in new window plugin for Platform.shopen in new window. When installed it...

  • Allows users to spin up their Platform.sh projects for development with Lando
  • Allows users to sync database relationships and mounts between Platform.sh and Lando
  • Uses Platform.sh's own images for extremely close parity with production
  • Uses Platform.sh's own configuration files to determine what Lando should run and do
  • Provides users with relevant and containerized tooling commands

Of course, once a user is running their Platform.sh project with Lando they can take advantage of all the other awesome development featuresopen in new window Lando provides.

Installation

This plugin is included with Lando by default. That means if you have Lando version 3.0.8 or higher then this plugin is already installed!

However if you would like to manually install the plugin, update it to the bleeding edge or install a particular version then use the below. Note that this installation method requires Lando 3.5.0+.

# Ensure you have a global plugins directory
mkdir -p ~/.lando/plugins

# Install plugin
# NOTE: Modify the "yarn add @lando/platformsh" line to install a particular version eg
# yarn add @lando/platform@0.5.2
docker run --rm -it -v ${HOME}/.lando/plugins:/plugins -w /tmp node:14-alpine sh -c \
  "yarn init -y \
  && yarn add @lando/platformsh --production --flat --no-default-rc --no-lockfile --link-duplicates \
  && yarn install --production --cwd /tmp/node_modules/@lando/platformsh \
  && mkdir -p /plugins/@lando \
  && mv --force /tmp/node_modules/@lando/platformsh /plugins/@lando/platformsh"

# Rebuild the plugin cache
lando --clear
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

You should be able to verify the plugin is installed by running lando config --path plugins and checking for @lando/platformsh. This command will also show you where the plugin is being loaded from.

Basic Usage

Clone a project down from Platform.sh.

# Make and go into an empty directory
mkdir myproject && cd myproject

# Clone down code from Platform.sh
lando init --source

# Start the project up
lando start

# Pull down relationships and mounts
lando pull
1
2
3
4
5
6
7
8
9
10
11

Once your project is running you can access relevant tooling commandsopen in new window.

# Run platform cli commands
lando platform auth:info

# Note that mysql is the name of a relationship defined in .platform.yaml
# Access relationships directly
lando mysql main -e "show tables;"
# Manually importing a database
lando mysql main < dump.sql
1
2
3
4
5
6
7
8

You can also override Platform.sh configuarionopen in new window in your Landofile with things that make more sense for development.

name: platformsh-drupal8
recipe: platformsh
config:
  id: PROJECTID
  overrides:
    app:
      variables:
        env:
          APP_ENV: dev
        d8settings:
          skip_permissions_hardening: 1
    db:
      configuration:
        properties:
          max_allowed_packet: 63
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

For complete usage docs you should check out thisopen in new window, particularly:

Examples and Guides

If you are interested in working and tested examples and/or guides then check out both the examplesopen in new window and guidesopen in new window folders. Here is a subset of some of our most popular content:

@TODO: need to link to the above when they are available

Issues, Questions and Support

If you have a question or would like some community support we recommend you join us on Slackopen in new window.

If you'd like to report a bug or submit a feature request then please use the issue queueopen in new window in this repo.

Changelog

We try to log all changes big and small in both THE CHANGELOGopen in new window and the release notesopen in new window.

Development

If you're interested in working on this plugin then we recommend you check out the development guideopen in new window.

Contributors

Made with contributors-imgopen in new window.

Other Selected Resources

Last Updated: 11/3/2021, 12:51:40 PM
Contributors: Mike Pirog