Skip to main content

Lagoon deployment

Lagoon deployment triggers a deployment on the Lagoon hosting platform by calling its webhook URL.

How it works

When lagoon is included in $VORTEX_DEPLOY_TYPES, the deployment script calls the Lagoon webhook URL to trigger a deployment. Lagoon then:

  1. Pulls the latest code from your repository
  2. Builds container images using your docker-compose.yml
  3. Deploys containers to Kubernetes
  4. Runs post-rollout tasks defined in .lagoon.yml

Configuration

Environment variables

VariableRequiredDefaultLocationDescription
LAGOON_PROJECTYes.envYour Lagoon project name
VORTEX_DEPLOY_LAGOON_INSTANCENoamazeeio.envLagoon instance name
VORTEX_DEPLOY_LAGOON_INSTANCE_GRAPHQLNoAuto-generated.envLagoon GraphQL endpoint
VORTEX_DEPLOY_LAGOON_INSTANCE_HOSTNAMENoAuto-generated.envLagoon SSH hostname
VORTEX_DEPLOY_LAGOON_INSTANCE_PORTNoAuto-generated.envLagoon SSH port
VORTEX_DEPLOY_LAGOON_BRANCHNoCurrent branchCIBranch to deploy

Setup

  1. Add lagoon to the VORTEX_DEPLOY_TYPES variable in your .env file:

    .env
    VORTEX_DEPLOY_TYPES=lagoon
  2. Configure your Lagoon project name:

    .env
    LAGOON_PROJECT=your-project-name
  3. Ensure your CI has the Lagoon SSH key configured for authentication.

Post-deployment automation

When code is deployed, Vortex automatically:

  1. Provisions the site - Runs database updates, imports configuration, clears caches
  2. Sends notifications - Notifies configured channels about the deployment

This is implemented using post-rollout tasks defined in the .lagoon.yml configuration file.

Environment types

Lagoon creates different environment types based on your branch:

Branch patternEnvironment type
main, masterProduction
developDevelopment
release/*, hotfix/*Staging
Pull requestsDevelopment (ephemeral)

See also