Lando Integration

By Jérôme Vieilledent, on Aug 10, 2021

Lando simplifies your local development dramatically. It is a development platform based on Docker, which abstracts all the fuzziness of a Docker / Docker-Compose setup, and thus reduces the DevOps hassle.

Blackfire now integrates seamlessly with Lando, thanks to the official plugin. Install it and profile your PHP or Python applications!

Here is an example of a Landofile, using the Symfony recipe and with Blackfire enabled:

name: my-symfony-app
recipe: symfony
config:
  php: '8.0'
  via: nginx
  webroot: public

services:
  # Declaring the blackfire service, containing the agent
  blackfire:
    type: blackfire
    # appserver is the default name for the application container
    # It may differ depending on the recipe (e.g. for platformsh, it is "app")
    app_service: appserver
    server_id: <BLACKFIRE_SERVER_ID>
    server_token: <BLACKFIRE_SERVER_TOKEN>
    client_id: <BLACKFIRE_CLIENT_ID>
    client_token: <BLACKFIRE_CLIENT_TOKEN>

Using Blackfire Tools

By declaring the use of Blackfire in your Landofile, the Blackfire Probe (for PHP apps), CLI command, and Player are getting installed into your application container. As such, you may use them seamlessly to, e.g., profile CLI commands or run Player scenarios.

You may also directly expose these tools as a Lando tooling command:

# .lando.yml
tooling:
  blackfire:
    service: appserver

  blackfire-player:
    service: appserver

When using this snippet, you will be able to run the commands within your application container by prefixing them with the lando command:

lando blackfire version
lando blackfire-player run .blackfire.yaml

Give Blackfire a try!

Looking for ways to ease your development process? Give Lando+Blackfire a try! Drop us a line to share your experience with us as we are always looking for ways to integrate Blackfire with your workflows seamlessly.

Play with the demo or subscribe now!

Happy Profiling!

Jérôme Vieilledent

As a Developer Advocate, Jérôme is all about spreading the love! His technical/development background enable him to talk as a peer to peers with our developer users. You’ll read his tips and advices on performance management with Blackfire. And he’ll support you as a day-to-day user.