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:
- Pulls the latest code from your repository
- Builds container images using your
docker-compose.yml - Deploys containers to Kubernetes
- Runs post-rollout tasks defined in
.lagoon.yml
Configuration
Environment variables
| Variable | Required | Default | Location | Description |
|---|---|---|---|---|
LAGOON_PROJECT | Yes | .env | Your Lagoon project name | |
VORTEX_DEPLOY_LAGOON_INSTANCE | No | amazeeio | .env | Lagoon instance name |
VORTEX_DEPLOY_LAGOON_INSTANCE_GRAPHQL | No | Auto-generated | .env | Lagoon GraphQL endpoint |
VORTEX_DEPLOY_LAGOON_INSTANCE_HOSTNAME | No | Auto-generated | .env | Lagoon SSH hostname |
VORTEX_DEPLOY_LAGOON_INSTANCE_PORT | No | Auto-generated | .env | Lagoon SSH port |
VORTEX_DEPLOY_LAGOON_BRANCH | No | Current branch | CI | Branch to deploy |
Setup
-
Add
lagoonto theVORTEX_DEPLOY_TYPESvariable in your.envfile:.envVORTEX_DEPLOY_TYPES=lagoon -
Configure your Lagoon project name:
.envLAGOON_PROJECT=your-project-name -
Ensure your CI has the Lagoon SSH key configured for authentication.
Post-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.
Environment types
Lagoon creates different environment types based on your branch:
| Branch pattern | Environment type |
|---|---|
main, master | Production |
develop | Development |
release/*, hotfix/* | Staging |
| Pull requests | Development (ephemeral) |
See also
- Lagoon hosting - Detailed Lagoon hosting configuration
- Lagoon documentation - Official Lagoon docs