Release Notes: platform updates and DDEV Preview FAQ

DDEV-Live Preview bot comments on GitHub showing deployment of a preview site and the preview URL

We squeezed in a few more platform updates for you before the end of the year! Thank you to the folks who have been using DDEV Preview already and who shared their feedback. Below you’ll find some of the latest updates to DDEV-Live for hosting as well as an FAQ for the Preview features. Preview sites are designed to be temporary instances on the DDEV-Live platform that can be used to see new code in a production-like environment, share work, test with users, or used however you see fit. Preview can be used whether your production site is hosted on DDEV or not, and of course it pairs well with our full end-to-end workflow from DDEV-Local. Mix and match!

You may want to: Install or update the ddev-live CLI or Create your DDEV-Live account.

In the latest release of the DDEV-Live hosting platform:

Default PHP version is now 7.3. PHP 7.2 is still available (but not recommended), as is 7.4 and 8 has just been added.

We’ve also been working on adding appropriate controls for workspace administrators on the platform to list, add and remove users in a given DDEV workspace. This is available with ddev-live admin.

Users can now expect to access the same repositories they have access to on GitHub via ddev-live, where they are a member of an organization that has installed the ddev-live GitHub app.

DDEV-Live CLI release 0.9.0:

Users will now be able to execute ddev-live list repositories for a list of repositories connected to the current workspace.

Users will now be able to create a Preview site using the CLI and ddev-live create clone site against an existing site in their workspace. Created clones can be described and listed via ddev-live describe clone <my-clone> and ddev-live list clones respectively. Clones are operations which will ultimately result in a site. The resulting sites will also appear in the  ddev-live list sites command and can be described individually with ddev-live describe site <my-clone>.

When you describe a site, you will also be able to clearly see whether it is a clone and what its origin site is. And of course, ddev-live delete site <my-clone> will clean up your workspace, remove the clone, and free up space to create another site.

brew upgrade ddev-live or download.

Some Frequently Asked Questions on DDEV Preview:

Q: How do I set an automatic expiration on a Preview site I created using the PR chat bot?

A: Preview sites created directly on PRs in GitHub or GitLab will be automatically deleted when the PR closes, or when you comment on the PR with /ddev-live-delete-preview-site. Any site of type “clone” is also automatically deleted when the origin site is deleted, so there are no orphaned site clones.

Q: What if I want my Preview site to expire at a different time, such as 24 hours after creation?

A: You can add a site expiration via the ddev-live CLI as you would for any site. First run ddev-live list clones or check your PR for the Preview <site> name, then run ddev-live config drupal <site> --expires-in 1d. Read more about site expirations in the docs.

Q: Can I use the bot with or only with self-hosted GitLab installation?

A: Using the bot on works the same as on self-hosted GitLab.

Q: How can I specify a database for my Preview site?

A: As a Preview site is a clone of an origin site, it automatically receives a clone of the origin site database at the time of the creation. Once created, the origin and clone databases may diverge, and can be optionally synced using ddev-live push / pull if desired. 

The same applies for the file assets. The file assets are cloned without a delay using copy-on-write file system, so the clone site receives its assets instantly. 

To replace the default cloned database, you can use ddev-live push db <pr-site> to push a separate prepared database in.

Q: Is there an extra charge for the Preview features? Is there a limit? Do they time out?

A: Preview is included on all DDEV-Live plans

A Preview site from the perspective of billing and quota management is the same as any other site. For a plan which includes N sites, you can have up to N sites on DDEV-Live in total, regardless of their type (regular “site” or “clone”, for example). 

By default, Preview sites don’t timeout, except when their lifespan is tied to the PR they were created on – then they are deleted when the PR is closed. It is also possible to use ddev-live config [site-type] [site-name] --expires-in=[duration] to configure any site’s expiration.

Q: If my plan includes 5 sites, are there rules as to how I allocate those sites for Preview, production, etc?

A: The limit is for all types of sites in total. If you have a cap of 5 sites, you can have 1 origin + 4 clones; or 3 origin + 2 clones, etc. 

To put it slightly differently: you may choose to have one Preview site for each site you deploy on DDEV-Live, or have one production site (live on the web), two deployed non-production sites, and two Preview sites that reference one of the deployed sites as their origin.

Q: What happens if you use the maximum number of sites and then try to launch another Preview?

A: The PR bot will inform you on the PR that you are about to hit your quota. Here is a screenshot:

Screenshot of the ddev preview bot feedback, showing a comment on a Git PR that says "error log... denied the request: would exceed quota..."

Q: The Preview bot comments keep disappearing from my PR, why is that?

A: The bot interaction is intended to be summarized on the bottom of the PR thread. You will always find the most current status for the site when you scroll all the way down. To keep the thread tidy, the bot cleans up after itself for all the old and no longer relevant messages. To republish the PR bot help text at any time, comment with /ddev-live-help.

What’s next?

If you’d like to know more about how DDEV-Live and the Preview feature set work, watch as DDEV-Local maintainer Randy Fay creates a Preview site using the PR bot.

Our goal is to provide you with features and functionality that assist you in the ways you want to work, whether that’s managing long term workflow complexity or just spinning up a quick site. As always, the most valuable thing you can do is send your feedback on the experience! Ask questions, experiment, and use that DDEV-Live API token to integrate. 

Share this post: