I've successfully analyzed your ICC Rule Engine codebase and created a comprehensive .env file with all the environment variables your application uses. This guide explains how to sync environment variables from your Render service to your local development environment.
.env- Your local environment variables file (6,399 bytes).env.backup- Backup of your previous .env filesync_env_vars.py- Script to regenerate the .env fileENV_SYNC_GUIDE.md- This guide
Based on code analysis, your application uses 50+ environment variables across these categories:
ENVIRONMENT- Environment mode (development/production)DEMO_MODE- Demo mode flagPORT- Application port
DATABASE_URL- Database connection string
REDIS_URL- Redis connection stringALLOW_IN_MEMORY_REDIS- Allow in-memory Redis for demo
JWT_SECRET- JWT token signing secretSESSION_SECRET- Session signing secret
ALLOWED_ORIGINS- CORS allowed originsADMIN_CORS_ORIGINS- Admin CORS origins
MULTI_TENANT_ENABLED- Multi-tenant supportUSAGE_LOGGING_ENABLED- Usage logging for billingLOGGING_ENABLED- Structured loggingLLM_VALIDATION_ENABLED- LLM validationMETRICS_COLLECTION_ENABLED- Metrics collectionMETRICS_ENABLED- Metrics endpointASYNC_VALIDATION_ENABLED- Async validation
RATE_LIMIT_REQUESTS- Rate limit requests per windowRATE_LIMIT_WINDOW- Rate limit window in seconds
QUEUE_MAX_RETRIES- Queue max retriesQUEUE_RETRY_BACKOFF_BASE- Queue retry backoffREGION- Processing region
TELEMETRY_ENABLED- Telemetry collectionTELEMETRY_PIPELINE_V2- Telemetry pipeline v2TELEMETRY_TRANSPORT- Telemetry transport methodTELEMETRY_SERVICE- Service nameTELEMETRY_BUFFER_SIZE- Telemetry buffer sizeTELEMETRY_SQLITE_PATH- Telemetry SQLite pathTELEMETRY_DB_PATH- Telemetry database path
KAFKA_ENABLED- Kafka integrationKAFKA_BROKERS- Kafka brokersTELEMETRY_KAFKA_BROKERS- Telemetry Kafka brokersTELEMETRY_KAFKA_TOPIC- Telemetry Kafka topicTELEMETRY_KAFKA_GROUP- Telemetry Kafka group
TELEMETRY_REDIS_DSN- Telemetry Redis DSNTELEMETRY_REDIS_LIST- Telemetry Redis listTELEMETRY_REDIS_STREAM- Telemetry Redis stream
CLICKHOUSE_DSN- ClickHouse DSNTELEMETRY_CLICKHOUSE_DSN- Telemetry ClickHouse DSNTELEMETRY_CLICKHOUSE_TABLE- Telemetry ClickHouse tableTELEMETRY_POLL_INTERVAL_MS- Telemetry poll intervalTELEMETRY_MAX_BATCH- Telemetry max batch size
OPENAI_API_KEY- OpenAI API keySTRIPE_SECRET_KEY- Stripe secret keySTRIPE_PUBLISHABLE_KEY- Stripe publishable keySTRIPE_WEBHOOK_SECRET- Stripe webhook secretSTRIPE_CHECKOUT_SUCCESS_URL- Stripe success URLSTRIPE_CHECKOUT_CANCEL_URL- Stripe cancel URL
ZENDESK_SUBDOMAIN- Zendesk subdomainZENDESK_EMAIL- Zendesk emailZENDESK_API_TOKEN- Zendesk API tokenJIRA_BASE_URL- JIRA base URLJIRA_EMAIL- JIRA emailJIRA_API_TOKEN- JIRA API tokenJIRA_PROJECT_KEY- JIRA project key
HOSTNAME- System hostnameCOMPUTERNAME- Computer nameINSTANCE_ID- Instance IDSERVICE_NAME- Service name
DEBUG- Debug modeRELOAD- Auto-reload
Edit the .env file with your local development values:
# Essential for local development
JWT_SECRET=your-local-jwt-secret-here
SESSION_SECRET=your-local-session-secret-here
DATABASE_URL=sqlite:///icc_rules.db
REDIS_URL=redis://localhost:6379Since Render doesn't expose environment variables via API for security reasons, you'll need to:
-
Go to your Render dashboard:
- Visit: https://dashboard.render.com/web/srv-d35ovhndiees738g995g
- Navigate to the "Environment" tab
-
Copy production values:
- Copy the values you need from Render
- Update your local
.envfile accordingly
For local development, you'll need:
- Database: SQLite (default) or PostgreSQL
- Redis: Local Redis instance
- Optional: OpenAI API key for LLM features
# Start your application
uvicorn app.main:app --reload
# Check health endpoint
curl http://localhost:8000/healthIf you need to regenerate the .env file:
python sync_env_vars.pyThis will:
- Analyze your codebase for environment variables
- Create a new
.envfile with all variables - Backup your existing
.envfile
- Never commit
.envfiles to version control - Use strong secrets for JWT_SECRET and SESSION_SECRET
- Keep API keys secure and don't share them
- Use different values for development vs production
-
Missing JWT_SECRET/SESSION_SECRET:
JWT_SECRET=your-strong-secret-here SESSION_SECRET=your-strong-secret-here
-
Redis connection issues:
REDIS_URL=redis://localhost:6379 # Or for demo mode: DEMO_MODE=true ALLOW_IN_MEMORY_REDIS=true -
Database connection issues:
# For SQLite (local development): DATABASE_URL=sqlite:///icc_rules.db # For PostgreSQL (production): DATABASE_URL=postgresql://user:pass@host:port/db?sslmode=require
If you encounter issues:
- Check the application logs
- Verify all required environment variables are set
- Ensure local services (Redis, database) are running
- Check the health endpoint:
/health
Created: October 13, 2025
Service: icc-rule-engine (srv-d35ovhndiees738g995g)
Status: Environment variables successfully synced to local development