ddev get platformsh/ddev-platformsh (platformsh/ddev-platformsh for more complete Platform.sh integration.
ddev provides integration with the Platform.sh Website Management Platform, which allows Platform.sh users to quickly download and provision a project from Platform.sh in a local ddev-managed environment.
ddev's Platform.sh integration pulls database and files from an existing Platform.sh site/environment into your local system so you can develop locally.
Platform.sh Global Configuration¶
You need to obtain and configure an API token first. This is only needed once.
- Login to the Platform.sh Dashboard and go to Account->API Tokens to create an API token for ddev to use.
- Add the API token to the
web_environmentsection in your global ddev configuration at ~/.ddev/global_config.yaml:
Platform.sh per Project Configuration¶
- Check out the site from platform.sh and then configure it with
ddev config. You'll want to use
ddev startand make sure the basic functionality is working.
Add PLATFORM_PROJECT and PLATFORM_ENVIRONMENT variables to your project.
Or with a command from your terminal:
ddev pull platform. After you agree to the prompt, the current upstream database and files will be downloaded.
- Optionally use
ddev push platformto push local files and database to platform.sh. Note that
ddev pushis a command that can potentially damage your production site, so this is not recommended.
ddev pull platformwill connect to Platform.sh to download database and files. To skip downloading and importing either file or database assets, use the
- If you need to change the
platform.yamlrecipe, you can change it to suit your needs, but remember to remove the "#ddev-generated" line from the top of the file.