Overview
Manage environment variables and secrets for your Qovery services. This command helps you import and parse environment variables.
Commands
Import Environment Variables
Import environment variables/secrets for a Qovery service:
This command allows you to bulk import environment variables from a file or other source into your Qovery application, container, or job.
Parse Environment Variables
Parse environment variables and create .env (dot env) file:
This command parses environment variables and generates a local .env file for development purposes.
Options
| Flag | Description |
|---|
--organization | Organization name |
--project | Project name |
--environment | Environment name |
--service | Service name |
--help | Show help |
Examples
Import Variables from File
# Prepare your environment variables in a file
cat > vars.env <<EOF
API_KEY=your-api-key
DATABASE_URL=postgresql://localhost:5432/mydb
FEATURE_FLAG=enabled
EOF
# Import to Qovery service
qovery env import
Parse Variables to .env File
# Generate .env file from Qovery environment
qovery env parse
# This creates a .env file with all environment variables
# from your Qovery environment
Development Workflow
# 1. Parse environment variables from Qovery
qovery env parse
# 2. Use .env file locally
cat .env
# 3. Run your application locally with same variables
npm run dev # or your local dev command
Managing Service-Specific Variables
For managing environment variables of specific services, use the service-specific commands:
# Application environment variables
qovery application env list
qovery application env create --key "API_KEY" --value "secret"
# Database environment variables
qovery database env list
# Container environment variables
qovery container env list
# Cronjob environment variables
qovery cronjob env list
# Lifecycle job environment variables
qovery lifecycle env list
Tips
Use qovery env parse to keep your local development environment in sync with your Qovery configuration.
The import command is useful for migrating from other platforms or bulk-updating environment variables.
Never commit .env files containing secrets to version control. Add .env to your .gitignore file.