Lagoon Integration¶
DDEV provides integration with Lagoon, allowing users to quickly sync the files and database from a Lagoon environment to the local DDEV project.
Lagoon Per-Project Configuration¶
- Check out the Lagoon project and configure it by running
ddev config
. You’ll want to runddev start
and make sure the basic functionality is working. - Add
LAGOON_PROJECT
andLAGOON_ENVIRONMENT
variables to your project using'web_environment'
in its YAML configuration or a.ddev/.env
file. For example, runddev config --web-environment-add="LAGOON_PROJECT=<project-name>,LAGOON_ENVIRONMENT=<environment-name>"
. - Configure an SSH key for your Lagoon user.
- Run
ddev auth ssh
to make your SSH key available in the project’s web container. - Run
ddev restart
. - Run
ddev pull lagoon
. After you agree to the prompt, the current upstream databases and files will be downloaded. - Optionally run
ddev push lagoon
to push local files and database to Lagoon. Theddev push
command can potentially damage your production site, so we don’t recommend using it.
Usage¶
ddev pull lagoon
will connect to the Lagoon environment to download database and files. To skip downloading and importing either file or database assets, use the--skip-files
or--skip-db
flags.- If you need to change the
.ddev/providers/lagoon.yaml
recipe, you can change it to suit your needs, but remember to remove the#ddev-generated
line from the top of the file.