Documentation Index Fetch the complete documentation index at: https://qovery-docs-cronjob-required-affinity.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Deploy your applications with GitLab CI using the Qovery CLI.
Prerequisites
Before you can deploy your application with GitLab CI, you need to:
Install the Qovery CLI
Generate a Qovery API token (via CLI or Console)
Set the environment variable QOVERY_CLI_ACCESS_TOKEN with your API token
Disable Qovery Auto Deployment on the services you want to deploy manually
Deploy a Container Application
Here is an example of a GitLab CI configuration file (.gitlab-ci.yml) to deploy a container application:
stages :
- build
- deploy
build :
stage : build
image : docker:latest
services :
- docker:dind
script :
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
deploy :
stage : deploy
image : alpine:latest
script :
- apk add --no-cache curl bash
- curl -s https://get.qovery.com | bash
- export QOVERY_CLI_ACCESS_TOKEN=$QOVERY_CLI_ACCESS_TOKEN
- qovery container deploy \
--organization "My Organization" \
--project "My Project" \
--environment "Production" \
--container "myapp" \
--tag $CI_COMMIT_SHA \
--watch
only :
- main
This workflow assumes you have:
A container registry connected to Qovery
An existing container application on Qovery
Set the QOVERY_CLI_ACCESS_TOKEN variable in your GitLab CI/CD settings
Deploy a Single Application
Use the Qovery CLI to deploy a single application:
qovery application deploy \
--organization "My Organization" \
--project "My Project" \
--environment "Production" \
--application "myapp" \
--commit-id < commit-i d > \
--watch
Deploy Multiple Applications
Different Applications with Different Commits
qovery application deploy \
--organization "My Organization" \
--project "My Project" \
--environment "Production" \
--application "app1" \
--commit-id < commit-id- 1> \
--watch
qovery application deploy \
--organization "My Organization" \
--project "My Project" \
--environment "Production" \
--application "app2" \
--commit-id < commit-id- 2> \
--watch
Multiple Applications with the Same Commit (Monorepo)
qovery application deploy \
--organization "My Organization" \
--project "My Project" \
--environment "Production" \
--applications "app1,app2,app3" \
--commit-id < commit-i d > \
--watch
Manage Preview Environments
Clone an Environment
qovery environment clone \
--organization "My Organization" \
--project "My Project" \
--environment "Production" \
--new-environment-name "preview-mr-123" \
--cluster "my-cluster"
Update Application Branch in Cloned Environment
qovery application update \
--organization "My Organization" \
--project "My Project" \
--environment "preview-mr-123" \
--application "myapp" \
--branch "feature-branch"
Deploy the Preview Environment
qovery application deploy \
--organization "My Organization" \
--project "My Project" \
--environment "preview-mr-123" \
--application "myapp" \
--commit-id < commit-i d > \
--watch
Delete Preview Environment
qovery environment delete \
--organization "My Organization" \
--project "My Project" \
--environment "preview-mr-123" \
--yes
If you’re using Terraform to manage your infrastructure, you can integrate it with your CI/CD pipeline. See the Terraform Provider documentation for more information.
Next Steps
Qovery CLI Learn more about Qovery CLI commands
API Token Generate and manage API tokens
Auto-Deploy Configure automatic deployments
GitHub Actions Deploy with GitHub Actions