Skip to main content Skip to navigation

Documentation

Everything you need to build irresistible applications

Environment Variables

Configure your deployment with environment variables.

Overview

Environment variables allow you to configure your application for different environments without changing code.

Setting Environment Variables

Via Dashboard

  1. Navigate to your project settings
  2. Click on “Environment Variables”
  3. Add key-value pairs
  4. Save and redeploy

Via API

curl -X POST https://api.irresistible.dev/projects/PROJECT_ID/env 
  -H "Authorization: Bearer YOUR_TOKEN" 
  -d '{"key": "API_KEY", "value": "secret-value"}'

Common Variables

Application Settings

NODE_ENV=production
PORT=3000
PUBLIC_URL=https://myapp.irresistible.dev

Database Configuration

DATABASE_URL=postgresql://user:pass@host:5432/db
DB_POOL_SIZE=10
DB_TIMEOUT=30000

API Keys

STRIPE_API_KEY=sk_live_...
SENDGRID_API_KEY=SG...
AWS_ACCESS_KEY_ID=AKIA...

Environment-Specific Variables

Development

DEBUG=true
LOG_LEVEL=debug
ENABLE_HOT_RELOAD=true

Production

DEBUG=false
LOG_LEVEL=error
ENABLE_CACHE=true

Security Best Practices

  1. Never commit secrets to version control
  2. Use different values for each environment
  3. Rotate secrets regularly
  4. Limit access to production variables
  5. Encrypt sensitive values at rest

Variable Precedence

  1. Environment-specific files (.env.production)
  2. Local .env file
  3. System environment variables
  4. Default values in code

Reserved Variables

These variables are set automatically:

  • IRRESISTIBLE_PROJECT_ID
  • IRRESISTIBLE_DEPLOYMENT_ID
  • IRRESISTIBLE_REGION
  • IRRESISTIBLE_URL