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 startand make sure the basic functionality is working. -
Add
LAGOON_PROJECTandLAGOON_ENVIRONMENTvariables to your project using'web_environment'in its YAML configuration or a.ddev/.envfile. For example:You can also do this with:
-
Syncing is done via
lagoon-syncwhich must be configured in your.lagoon.ymlor.lagoon-sync.yml, see the DDEV example.lagoon.yml. - Configure an SSH key for your Lagoon user.
- Run
ddev auth sshto 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 use
ddev push lagoonto push local files and database to Lagoon. Theddev pushcommand must be done with great care if you’re pushing to a production environment, but is great for pushing to branch environments.
Usage¶
ddev pull lagoonwill connect to the Lagoon environment to download database and files. To skip downloading and importing either file or database assets, use the--skip-filesand--skip-dbflags.-
To pull from a specific environment without permanently changing your project config, pass environment variables using
--environment:You can combine multiple variables:
-
If you need to change the
lagoon.yamlrecipe, you can change it to suit your needs, but remember to remove the#ddev-generatedline from the top of the file.