Lagoon
Lagoon is an open-source container-based hosting platform that provides automated deployments for Drupal applications using Docker and Kubernetes.
For general Lagoon documentation, refer to the Lagoon Documentation.
Integration
Vortex provides the following integration with Lagoon:
Tasks
With Vortex, you can:
- Fetch a database from a Lagoon environment for local development or CI
- Trigger deployments to Lagoon environments
- Run custom commands on Lagoon environments
When running these tasks, your .env and .env.local files are used as the
source for the project name and SSH configuration.
Deployment automation
When code is deployed, Vortex automatically:
- Provisions the site - Runs database updates, imports configuration, clears caches
- Sends notifications - Notifies configured channels about the deployment
This is implemented using post-rollout tasks defined in the
.lagoon.yml
configuration file, which also defines Docker image mappings and
environment-specific configurations.
Environment detection
Vortex automatically detects when running on Lagoon and applies the
Lagoon-specific Drupal settings through the
drevops/environment-detector
package. This includes Lagoon-specific configurations for caching, file paths,
and environment variables provided by the platform.
Onboarding
Lagoon onboarding is part of the project setup flow. See Set up integrations in the Installation guide and select Lagoon.
Routine Operations
Fetch database
Download a current database dump from your Lagoon environment for local development or CI builds:
ahoy fetch-db
This wraps the provider-native
Lagoon CLI. If a lagoon binary is
already on your PATH, Vortex uses it as-is. Otherwise it downloads a
pinned release into a cache directory (.artifacts/tmp by default, overridable
with VORTEX_LAGOONCLI_PATH) and reuses that copy on later runs, so nothing
needs to be pre-installed. This works the same on a developer host and inside
the Lagoon environment, letting the same command pull the production database
into a non-production environment without a round-trip through a developer
machine.
When running inside the Lagoon environment, set VORTEX_FETCH_DB_SSH_FILE=false
to skip SSH key setup and use the ambient Lagoon identity instead of a developer
SSH key.
The instance is registered in an isolated, per-run config file rather than your
default ~/.lagoon.yml, so any Lagoon configuration you already have locally is
left untouched.
The dump is created on demand with Lagoon's built-in drush-sqldump task, so it
reflects the current state of the source database. To avoid re-dumping on every
run, a recent completed dump is reused when its artifact can still be
downloaded, within 24 hours by default (overridable with
VORTEX_FETCH_DB_LAGOON_REUSE_MAX_AGE, in seconds). Creating a fresh dump is
always the fallback when no reusable dump is available. Force a new dump with:
ahoy fetch-db --fresh