### GCP Installation Script Output Example Source: https://github.com/qovery/documentation/blob/main/docs/snippets/gcp-credentials-json-key.mdx This is an example of the output you might see when running the Qovery GCP installation script to create a service account and generate a JSON key file. ```bash Activating services APIs Operation "operations/acf.p2-..." finished successfully. ... Creating service account qovery-service-account Created service account [qovery-service-account]. ... created key [abc123...] of type [json] as [key.json] ✓ Credentials configured successfully ``` -------------------------------- ### Install Qovery Go SDK Source: https://github.com/qovery/documentation/blob/main/docs/api-reference/introduction.mdx Install the Qovery client library for Go using the go get command. Ensure you have Go installed and configured. ```bash go get github.com/qovery/qovery-client-go ``` -------------------------------- ### Azure Installation Script Output Example Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/installation/azure.mdx This is an example of the output you can expect after running the Qovery installation script in Azure Cloud Shell. It confirms the service principal creation and role assignment. ```bash Creating service principal for Qovery... Service principal created successfully! Assigning Contributor role... ✓ Credentials configured successfully Subscription ID: 12345678-1234-1234-1234-123456789abc Tenant ID: 87654321-4321-4321-4321-cba987654321 ``` -------------------------------- ### Run Documentation Locally Source: https://github.com/qovery/documentation/blob/main/README.md Use this command to start the documentation development server locally after installing Mintlify. ```bash mintlify dev ``` -------------------------------- ### Example Schedule for Deployment Rule Source: https://github.com/qovery/documentation/blob/main/docs/configuration/deployment-rule.mdx This is an example of how to configure start and stop schedules for a deployment rule, including timezone and days of the week. ```text Start: Monday-Friday at 8:00 AM (Europe/Paris) Stop: Monday-Friday at 7:00 PM (Europe/Paris) ``` -------------------------------- ### Start Local Qovery Demo Environment Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/demo.mdx Use `qovery demo up` to create a local Kubernetes cluster and install Qovery. You can specify a custom cluster name using the `--cluster-name` flag or enable debug output with `--debug`. ```bash qovery demo up ``` ```bash qovery demo up --cluster-name "my-demo" ``` ```bash qovery demo up --debug ``` -------------------------------- ### List Databases with Credentials Example Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/database.mdx Example command to list databases and display their credentials. ```bash qovery database list --show-credentials ``` -------------------------------- ### Database Deployment Example Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/database.mdx Example demonstrating how to set the context, list available databases, deploy a specific database, and watch its deployment status. ```bash # Set context qovery context set # List available databases qovery database list # Deploy database qovery database deploy --database "postgres-main" # Watch deployment status qovery database deploy --database "postgres-main" --watch ``` -------------------------------- ### Docker Hub Image Examples Source: https://github.com/qovery/documentation/blob/main/docs/configuration/integrations/container-registries/docker-hub.mdx Examples of how to specify Docker Hub image names and tags. ```text nginx:latest ``` ```text mycompany/myapp:v1.0.0 ``` -------------------------------- ### Start Development Server Source: https://github.com/qovery/documentation/blob/main/docs/rde/user/live-preview.mdx Use this command to start your application's development server. Ensure your application is actively listening on a port for the preview to display correctly. ```bash npm run dev # or your framework's equivalent ``` -------------------------------- ### Install and Use Qovery CLI Source: https://github.com/qovery/documentation/blob/main/docs/terraform-provider/overview.mdx This snippet shows how to install the Qovery CLI, authenticate, set the context, and list various resources like projects, clusters, environments, and applications. ```bash # Install Qovery CLI curl -s https://get.qovery.com | bash # Login qovery auth # Set context (interactive selection of organization) qovery context set # List projects in current organization qovery project list # List clusters in current organization qovery cluster list # List environments in current project qovery environment list # List applications in current environment qovery application list ``` -------------------------------- ### List Databases as JSON Example Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/database.mdx Example command to list databases and output the results in JSON format. ```bash qovery database list --json ``` -------------------------------- ### Add Qovery bucket and install CLI on Windows using Scoop Source: https://github.com/qovery/documentation/blob/main/docs/snippets/install-qovery-cli.mdx Add the Qovery Scoop bucket and then install the Qovery CLI using Scoop. ```bash # Add Qovery bucket scoop bucket add qovery https://github.com/Qovery/scoop-qovery-cli # Install the CLI scoop install qovery-cli ``` -------------------------------- ### Install Qovery CLI on Windows Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/import-env-vars-cli.mdx Install the Qovery CLI on Windows using Scoop. ```powershell scoop bucket add qovery https://github.com/Qovery/scoop-qovery-cli.git scoop install qovery-cli ``` -------------------------------- ### Example Slack Bot Configuration Source: https://github.com/qovery/documentation/blob/main/docs/copilot/slack-bot.mdx An example of the command used to configure the Qovery Slack bot, demonstrating the expected format for the API token and channel ID. ```bash /qovery-token qov_abc123xyz456 C09M85XK3GQ ``` -------------------------------- ### Manually install Qovery CLI on Windows Source: https://github.com/qovery/documentation/blob/main/docs/snippets/install-qovery-cli.mdx Install the Qovery CLI on Windows manually by downloading the latest release and uncompressing its content to C:\Windows. ```bash Install the Qovery CLI on Windows manually by downloading the [latest release](https://github.com/Qovery/qovery-cli/releases), and uncompress its content to `C:\Windows`. ``` -------------------------------- ### Example Natural Language Queries Source: https://github.com/qovery/documentation/blob/main/docs/copilot/mcp-server.mdx Interact with your infrastructure using natural language prompts. These examples show how to query for environments, services, and projects. ```text "Show me all my environments" ``` ```text "What services are running in production?" ``` ```text "List projects in my organization" ``` -------------------------------- ### Install Qovery CLI on Linux/Unix Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/import-env-vars-cli.mdx Use this command to install the Qovery CLI on Linux or Unix-based systems. ```bash curl -s https://get.qovery.com | bash ``` -------------------------------- ### Database Maintenance Example Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/database.mdx Example showing how to stop a database for maintenance, perform operations, and then restart it. ```bash # Stop database qovery database stop --database "postgres-main" # Perform maintenance... # Restart database qovery database deploy --database "postgres-main" ``` -------------------------------- ### Image Format Examples Source: https://github.com/qovery/documentation/blob/main/docs/configuration/integrations/container-registries/generic.mdx Provides concrete examples of container image naming conventions. ```text registry.example.com/production/api:v1.0.0 harbor.company.com/project/frontend:latest nexus.internal.net/docker/backend:stable ``` -------------------------------- ### Qovery AI Skill Installation Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/use-cases/cloud-migration-and-scaling.mdx Install the Qovery AI skill with a single command to initiate the migration process. This is the first step in leveraging Qovery's AI for cloud migration. ```bash curl -s "https://get.qovery.com" | bash ``` -------------------------------- ### Add Qovery brew repository and install CLI on macOS Source: https://github.com/qovery/documentation/blob/main/docs/snippets/install-qovery-cli.mdx Add the Qovery Homebrew repository and then install the Qovery CLI using Homebrew. ```bash # Add Qovery brew repository brew tap Qovery/qovery-cli # Install the CLI brew install qovery-cli ``` -------------------------------- ### Install Qovery TypeScript/JavaScript SDK Source: https://github.com/qovery/documentation/blob/main/docs/api-reference/introduction.mdx Install the Qovery client library for TypeScript and JavaScript using npm. This is the first step before using the SDK in your project. ```bash npm install @qovery/client ``` -------------------------------- ### Install Qovery CLI on Arch Linux using yay Source: https://github.com/qovery/documentation/blob/main/docs/snippets/install-qovery-cli.mdx Install the Qovery CLI from the AUR (Arch User Repository) using the yay helper. ```bash yay qovery-cli ``` -------------------------------- ### Manually install Qovery CLI on Linux Source: https://github.com/qovery/documentation/blob/main/docs/snippets/install-qovery-cli.mdx Install a specific version of the Qovery CLI on Linux by downloading the release, verifying its checksum, and extracting it. Replace X.Y.Z with the desired version. ```bash VERSION=1.48.0 # version number without the 'v' prefix ARCH=amd64 # use arm64 for ARM64 ARCHIVE="qovery-cli_${VERSION}_linux_${ARCH}.tar.gz" # Download the binary and checksums for your platform curl -sL "https://github.com/Qovery/qovery-cli/releases/download/v${VERSION}/${ARCHIVE}" -o "${ARCHIVE}" curl -sL "https://github.com/Qovery/qovery-cli/releases/download/v${VERSION}/checksums.txt" -o checksums.txt # Verify the checksum of the downloaded file only (fails if tampered) grep "${ARCHIVE}" checksums.txt | sha256sum --check # Extract and install tar -xzf "${ARCHIVE}" mv qovery /usr/local/bin/qovery chmod +x /usr/local/bin/qovery ``` -------------------------------- ### Install Qovery Skill Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/how-it-works.mdx Run this command in your terminal to install the Qovery Skill for your AI coding tool. This is the first step for the AI Agent workflow. ```bash curl -fsSL https://skill.qovery.com/install.sh | bash ``` -------------------------------- ### Wildcard Pattern Examples Source: https://github.com/qovery/documentation/blob/main/docs/configuration/deployment-rule.mdx These examples demonstrate how different wildcard patterns match environment names. Use wildcards to create powerful rules that automatically apply to groups of environments. ```text dev-* → Matches: dev-api, dev-frontend, dev-backend ``` ```text staging-* → Matches: staging-api, staging-web ``` ```text [PR]* → Matches: All preview environments from pull requests ``` ```text prod-? → Matches: prod-1, prod-2, prod-a (single character after prod-) ``` -------------------------------- ### Verify Terraform Installation Source: https://github.com/qovery/documentation/blob/main/docs/terraform-provider/overview.mdx Verify that Terraform is installed correctly by running the version command. This is the first step in the quick start guide. ```bash # Verify installation terraform version ``` -------------------------------- ### Example API Request to Get Organization Source: https://github.com/qovery/documentation/blob/main/docs/api-reference/introduction.mdx This example demonstrates how to make a GET request to the /organization endpoint using token authentication. Replace YOUR_API_TOKEN with your actual API token. ```bash curl -X GET "https://api.qovery.com/organization" \ -H "Authorization: Token YOUR_API_TOKEN" \ -H "Content-Type: application/json" ``` -------------------------------- ### Example API Request Source: https://github.com/qovery/documentation/blob/main/docs/api-reference/introduction.mdx This example demonstrates how to make a GET request to the /organization endpoint using API token authentication. ```APIDOC ## GET /organization ### Description Retrieves organization details. This is an example endpoint to demonstrate API usage. ### Method GET ### Endpoint https://api.qovery.com/organization ### Parameters #### Headers - **Authorization** (string) - Required - API token for authentication. Format: `Token YOUR_API_TOKEN`. - **Content-Type** (string) - Required - Specifies the content type of the request, typically `application/json`. ### Request Example ```bash curl -X GET "https://api.qovery.com/organization" \ -H "Authorization: Token YOUR_API_TOKEN" \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **organization_id** (string) - The unique identifier for the organization. - **name** (string) - The name of the organization. #### Response Example ```json { "organization_id": "org_12345", "name": "My Qovery Organization" } ``` ``` -------------------------------- ### Document Environment Variables with .env.example Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/import-env-vars-cli.mdx Create a `.env.example` file with placeholder values to document your environment variables. ```bash # .env.example COLOR_BACKGROUND= API_URL= STRAPI_API_KEY= AUTH0_API_KEY_SECRET= ``` -------------------------------- ### Install Python Dependencies with Dockerfile Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/write-dockerfile.mdx Example Dockerfile for a Python application. Installs dependencies using pip and copies source code. ```dockerfile FROM python:3.11 WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt COPY . . ``` -------------------------------- ### Example Copilot Questions Source: https://github.com/qovery/documentation/blob/main/docs/copilot/console.mdx Type your questions in natural language to get assistance from the Copilot. ```text How do I deploy this application? Why is my Frontend service showing an error? What's the status of my PostgreSQL database? How do I add environment variables? ``` -------------------------------- ### Build Node.js Application with Dockerfile Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/write-dockerfile.mdx Example Dockerfile for a Node.js application. Installs dependencies using npm ci, copies source code, and builds the application. ```dockerfile FROM node:18 WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . RUN npm run build ``` -------------------------------- ### Test Authentication with cURL Source: https://github.com/qovery/documentation/blob/main/docs/api-reference/authentication.mdx Use this cURL command to test your authentication setup by making a GET request to the organization endpoint. Ensure your Qovery API token is set as an environment variable. ```bash curl -X GET "https://api.qovery.com/organization" \ -H "Authorization: Token ${QOVERY_API_TOKEN}" \ -H "Content-Type: application/json" \ -w "\nHTTP Status: %{http_code}\n" ``` -------------------------------- ### Initialize Python SDK and List Projects Source: https://github.com/qovery/documentation/blob/main/docs/api-reference/authentication.mdx Initialize the Qovery Python SDK with your API token to interact with the API. This example shows how to retrieve organization details and list all projects. ```python from qovery import Qovery # Initialize client client = Qovery(token="your-api-token") # Get organization org = client.organization.get() print(f"Organization: {org.name}") # List projects projects = client.projects.list() for project in projects: print(f"Project: {project.name}") ``` -------------------------------- ### Configuration Help with Copilot Source: https://github.com/qovery/documentation/blob/main/docs/copilot/console.mdx Ask how to add resources like databases to your environment. ```text How do I add a database? ``` -------------------------------- ### K6 E2E Test Script Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/use-cases/e2e-testing.mdx This script defines the E2E tests using K6. It includes setup for adding initial data and a default function to perform GET requests. Configure test options like user load and duration. ```javascript import http from 'k6/http'; import {check, group, sleep, fail} from 'k6'; import {uuidv4} from 'https://jslib.k6.io/k6-utils/1.4.0/index.js'; const api_host = `${__ENV.API_HOST}/api`; export const options = { stages: [ {duration: '5m', target: 100}, // traffic ramp-up from 1 to 100 users over 5 minutes. //{ duration: '30m', target: 100 }, // stay at 100 users for 30 minutes {duration: '1m', target: 50}, // ramp-down to 50 users ] } export function setup() { // add some data const params = { headers: { 'Content-Type': 'application/json', }, }; for (let i = 0; i < 20; i++) { const res = http.post(api_host, JSON.stringify({title: uuidv4()}), params); check(res, {'item added': (r) => r.status === 201}); } } export default function () { http.get(api_host); } ``` -------------------------------- ### Install MetalLB for On-Premise Load Balancing Source: https://github.com/qovery/documentation/blob/main/docs/configuration/integrations/kubernetes/byok.mdx Install MetalLB for bare metal Kubernetes clusters. Configure an IP address pool after installation. ```bash kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.12/config/manifests/metallb-native.yaml ``` ```bash cat < io::Result<()> { env::set_var("RUST_LOG", "actix_web=debug,actix_server=info"); env_logger::init(); HttpServer::new(|| { App::new() .wrap(middleware::Logger::default()) .service(tweet::list) .service(tweet::get) .service(tweet::create) .service(tweet::delete) .service(like::list) .service(like::plus_one) .service(like::minus_one) }) .bind("0.0.0.0:9090")? .run() .await } ``` -------------------------------- ### Install Qovery CLI on macOS Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/import-env-vars-cli.mdx Install the Qovery CLI on macOS using Homebrew. ```bash brew tap qovery/qovery-cli brew install qovery-cli ``` -------------------------------- ### Terraform Deployment Steps Source: https://github.com/qovery/documentation/blob/main/docs/terraform-provider/multi-environment.mdx Standard commands to initialize Terraform, set the Qovery API token as an environment variable, deploy your infrastructure, and view the outputs. ```bash # Initialize terraform init # Set API token export TF_VAR_qovery_api_token="your-api-token" # Deploy all environments terraform apply # View outputs terraform output ``` -------------------------------- ### Generate GCP WIF Setup Command Source: https://github.com/qovery/documentation/blob/main/docs/snippets/gcp-credentials-wif.mdx This command fetches and executes a setup script from Qovery to configure your GCP project for Workload Identity Federation. It requires your GCP Project ID and the desired Service Account Name. ```bash curl https://setup.qovery.com/create_credentials_gcp_wif.sh | bash -s -- \ YOUR_PROJECT_ID \ YOUR_SERVICE_ACCOUNT_NAME ``` -------------------------------- ### Multi-Environment Infrastructure Setup Source: https://github.com/qovery/documentation/blob/main/docs/copilot/examples/advanced-workflows.mdx Automate the creation of a mirrored staging environment with reduced resources compared to production. This is useful for testing and development. ```text You: "Create a complete staging infrastructure that mirrors production but with half the resources" Copilot: 1. Analyzes production infrastructure 2. Creates staging environment 3. Clones all services 4. Reduces resource allocations by 50% 5. Adjusts database sizes 6. Configures networking 7. Sets up monitoring 8. Validates complete setup ``` -------------------------------- ### Start Ruby Development Server Source: https://github.com/qovery/documentation/blob/main/docs/rde/user/using-the-editor.mdx Run this command to start the development server for a Ruby on Rails application. ```bash rails server ``` -------------------------------- ### Common Cron Schedule Examples Source: https://github.com/qovery/documentation/blob/main/docs/configuration/cronjob.mdx Provides examples of frequently used CRON schedules for different execution frequencies. ```cron */5 * * * * ``` ```cron 0 * * * * ``` ```cron 0 0 * * * ``` ```cron 0 2 * * 0 ``` -------------------------------- ### Automate Tenant Provisioning with Qovery API Source: https://github.com/qovery/documentation/blob/main/docs/getting-started/guides/advanced-tutorials/certificate-management-multi-tenant.mdx Use the Qovery API to automate the creation of new tenants. This example demonstrates a POST request to create a new environment with a specified Helm chart and values. ```bash # Example using Qovery API curl -X POST https://api.qovery.com/environment/xxx/helm \ -H "Authorization: Token YOUR_TOKEN" \ -d '{ "name": "tenant-' + TENANT_ID + '", "chart": "empty-chart", "values_override": {...} }' ``` -------------------------------- ### CI/CD Deployment Workflow with Token Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/token.mdx This GitHub Actions workflow demonstrates how to install the Qovery CLI, authenticate using a secret token, and deploy an application. ```yaml # .github/workflows/deploy.yml name: Deploy to Qovery on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Qovery CLI run: curl -s https://get.qovery.com | bash - name: Deploy Application env: QOVERY_CLI_ACCESS_TOKEN: ${{ secrets.QOVERY_TOKEN }} run: | qovery auth qovery application deploy --application "my-app" ``` -------------------------------- ### Start Python Development Server Source: https://github.com/qovery/documentation/blob/main/docs/rde/user/using-the-editor.mdx Execute this command to start the development server for a Python application using Django. ```bash python manage.py runserver ``` -------------------------------- ### Example Qovery-Assigned Domain Source: https://github.com/qovery/documentation/blob/main/docs/configuration/helm.mdx An example of a fully formed Qovery-assigned domain. This is automatically generated for services with public access enabled. ```plaintext p80-zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh ``` -------------------------------- ### Manage Application Environment Variables Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/env.mdx Examples for managing environment variables for Qovery applications, including listing and creating them. ```bash # Application environment variables qovery application env list qovery application env create --key "API_KEY" --value "secret" ``` -------------------------------- ### Import Variables from File Source: https://github.com/qovery/documentation/blob/main/docs/cli/commands/env.mdx Prepare your environment variables in a file and then import them to a Qovery service interactively. ```bash # Prepare your environment variables in a file cat > vars.env <