Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

add-on registry tests last commit release

DDEV Basin Deploy

Overview

This add-on provides an Ansistrano strategy to deploy a Basin project based on DDEV.

It deploys a DDEV project on a server that also runs DDEV using the same configuration but with the hardened images following the docs.

Only Drupal supported so far.

Installation

ddev add-on get upstreamable/ddev-basin-deploy
ddev restart

Requirements

A remote server running DDEV and rsync installed. Run the following command on the server before the first deploy:

ddev config global --instrumentation-opt-in=false --router-bind-all-interfaces --omit-containers=ddev-ssh-agent --use-hardened-images --performance-mode=none --use-letsencrypt [email protected]

To prepare it better for hosting and avoid interactive questions on the DDEV CLI that would stall the deploy. Adapt for the letsencrypt email and the instrumentation preferences.

Ensure cron is installed and running if you require cron jobs.

Usage

Once installed the deployment files need to be generated and adjusted Run the following command

ddev basin deploy:generate

And inspect what was created in .ddev/basin-deploy/. The files before-symlink-tasks.yaml, after-update-code.yml and playbook.yaml are not meant to be edited.

There is subfolders such as .ddev/basin-deploy/production/ for an environment with the different configurations such as the domain names for the environment or the SMTP server to use.

Before running the deployment a remote server is needed.

Add to .ddev/.env.web the following variables

ANSIBLE_REMOTE_USER=ubuntu
ANSIBLE_REMOTE_HOST=1.1.1.1

Replace by the values you would use in a ssh connection such as [email protected]. The user need to be able to run DDEV commands.

After the configuration restart the DDEV project and run:

ddev basin deploy:release

For every deployment. Defaults to the production environment.

Features

The deploy takes care of running the deploy commands such as drush deploy, configures the traefik proxy for the domains specified and configures the cron daemon tu run it periodically for the project.

Credits

Contributed and maintained by @upstreamable

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.