Files
Goa-gel-fullstack/.env.example
Mahi d9de183e51 feat: Runtime configuration and Docker deployment improvements
Frontend:
- Add runtime configuration service for deployment-time API URL injection
- Create docker-entrypoint.sh to generate config.json from environment variables
- Update ApiService, ApprovalService, and DocumentViewer to use RuntimeConfigService
- Add APP_INITIALIZER to load runtime config before app starts

Backend:
- Fix init-blockchain.js to properly quote mnemonic phrases in .env file
- Improve docker-entrypoint.sh with health checks and better error handling

Docker:
- Add API_BASE_URL environment variable to frontend container
- Update docker-compose.yml with clear documentation for remote deployment
- Reorganize .env.example with clear categories (REQUIRED FOR REMOTE, PRODUCTION, AUTO-GENERATED)

Workflow fixes:
- Fix DepartmentApproval interface to match backend schema
- Fix stage transformation for 0-indexed stageOrder
- Fix workflow list to show correct stage count from definition.stages

Cleanup:
- Move development artifacts to .trash directory
- Remove root-level package.json (was only for utility scripts)
- Add .trash/ to .gitignore
2026-02-08 18:45:01 -04:00

71 lines
2.6 KiB
Plaintext

# ==============================================================================
# Goa GEL Platform - Environment Configuration
# ==============================================================================
#
# LOCAL DEV: No config needed, just run: docker-compose up -d
# REMOTE/VM: Set the [REQUIRED FOR REMOTE] values below
# PRODUCTION: Set ALL security values with strong passwords
#
# ==============================================================================
# ==============================================================================
# [REQUIRED FOR REMOTE] External Access URLs
# ==============================================================================
# Set these when deploying to a VM, server, or Kubernetes
# These are the URLs that browsers/external clients use to reach your services
# Public URL where the API is accessible (used by frontend in browser)
# Examples: http://192.168.1.100:3001, https://api.goagel.gov.in
API_BASE_URL=http://localhost:3001/api/v1
# Allowed origins for CORS (frontend URL)
# Examples: http://192.168.1.100:4200, https://goagel.gov.in
CORS_ORIGIN=http://localhost:4200
# ==============================================================================
# [REQUIRED FOR PRODUCTION] Security Credentials
# ==============================================================================
# Change ALL of these for production - do not use defaults!
# JWT secret (minimum 32 characters)
# Generate: openssl rand -base64 32
JWT_SECRET=dev_jwt_secret_change_in_production_min32chars
# Database password
DATABASE_PASSWORD=postgres_dev_password
# MinIO storage credentials
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minio_dev_password
# Blockscout explorer secret
# Generate: openssl rand -base64 64
BLOCKSCOUT_SECRET_KEY_BASE=RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5
# ==============================================================================
# [AUTO-GENERATED] Blockchain Contract Addresses
# ==============================================================================
# Populated after deploying smart contracts: cd blockchain && npm run deploy
CONTRACT_ADDRESS_LICENSE_NFT=
CONTRACT_ADDRESS_APPROVAL_MANAGER=
CONTRACT_ADDRESS_DEPARTMENT_REGISTRY=
CONTRACT_ADDRESS_WORKFLOW_REGISTRY=
PLATFORM_WALLET_PRIVATE_KEY=
# ==============================================================================
# [OPTIONAL] Advanced Settings
# ==============================================================================
# NODE_ENV=production
# FORCE_RESEED=false
# External ports (if defaults conflict)
# API_PORT=3001
# FRONTEND_PORT=4200
# BLOCKSCOUT_PORT=4000