v2.4.0

Environments

IRA FORCE runs in multiple environments for development, testing, staging, and production. Each environment is isolated and configured for its specific purpose.

Environment Overview

๐Ÿ› ๏ธ

Development

LOCAL

Local development environment running on your machine with Docker Compose.

API http://localhost:3000
Web http://localhost:5173
DB localhost:5432
๐Ÿงช

Staging

STAGING

Pre-production environment mirroring production. Used for QA and UAT testing.

API https://api.staging.iraforce.cloud
Web https://app.staging.iraforce.cloud
Region us-east-1
๐Ÿš€

Production

PRODUCTION

Live production environment serving real customers across multiple regions.

API https://api.iraforce.cloud
Web https://app.iraforce.cloud
Regions us-east-1, eu-west-1, ap-south-1

Environment Access

Production Access

Production access requires VPN connection and multi-factor authentication. Contact DevOps for access requests.

Access Levels

Role Development Staging Production
Developer โœ… Full โœ… Full ๐Ÿ‘๏ธ Read-only logs
QA Engineer โœ… Full โœ… Full โŒ No access
DevOps โœ… Full โœ… Full โœ… Full
Tech Lead โœ… Full โœ… Full โšก Deploy + Read

Environment Configuration

Each environment uses different configuration values. Here's how to set up your local .env file:

Development (.env.development)

# Application
NODE_ENV=development
PORT=3000
LOG_LEVEL=debug

# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/iraforce_dev
REDIS_URL=redis://localhost:6379

# Authentication
JWT_SECRET=dev-secret-change-in-production
JWT_EXPIRES_IN=7d

# External Services (use mocks in dev)
MOCK_EXTERNAL_SERVICES=true

# Feature Flags
ENABLE_DEBUG_TOOLS=true
ENABLE_HOT_RELOAD=true

Staging (.env.staging)

# Application
NODE_ENV=staging
PORT=3000
LOG_LEVEL=info

# Database (AWS RDS)
DATABASE_URL=${STAGING_DATABASE_URL}
REDIS_URL=${STAGING_REDIS_URL}

# Authentication
JWT_SECRET=${STAGING_JWT_SECRET}
JWT_EXPIRES_IN=1d

# External Services
MOCK_EXTERNAL_SERVICES=false
SENTRY_DSN=${STAGING_SENTRY_DSN}

# Feature Flags
ENABLE_DEBUG_TOOLS=true
ENABLE_HOT_RELOAD=false

Production (.env.production)

# Application
NODE_ENV=production
PORT=3000
LOG_LEVEL=warn

# Database (AWS RDS Multi-AZ)
DATABASE_URL=${PROD_DATABASE_URL}
DATABASE_READ_REPLICA_URL=${PROD_DATABASE_READ_URL}
REDIS_URL=${PROD_REDIS_URL}

# Authentication
JWT_SECRET=${PROD_JWT_SECRET}
JWT_EXPIRES_IN=8h

# External Services
SENTRY_DSN=${PROD_SENTRY_DSN}
DATADOG_API_KEY=${DATADOG_API_KEY}

# Feature Flags
ENABLE_DEBUG_TOOLS=false
ENABLE_HOT_RELOAD=false

# Security
RATE_LIMIT_ENABLED=true
CORS_ORIGINS=https://app.iraforce.cloud

Deployment Flow

Code flows through environments via our CI/CD pipeline:

1

Feature Branch

Developers work on feature branches with local development environment

โ†’
2

Pull Request

PR triggers CI checks: tests, linting, security scans

โ†’
3

Merge to Main

Auto-deploys to staging environment

โ†’
4

Release Tag

Tagged releases deploy to production via ArgoCD

Database Per Environment

Environment Database Instance Type Data
Development PostgreSQL 15 (Docker) Local container Seed data
Staging AWS RDS PostgreSQL db.t3.medium Anonymized production snapshot
Production AWS RDS PostgreSQL Multi-AZ db.r6g.xlarge Live customer data
Database Refresh

Staging database is refreshed weekly with an anonymized production snapshot. PII is automatically scrubbed using our data masking pipeline.

Monitoring & Observability

Each environment has dedicated monitoring dashboards:

Next Steps

ESC