Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #102 merged: fix: include missing database types in environments get

Summary

Coolify API omits dragonfly, keydb, and clickhouse databases from the environment endpoint response. This fix cross-references with list_databases using lightweight summaries to populate these missing types.

Changes

  • Add environment_uuid, environment_name, and environment_id to DatabaseSummary for filtering
  • New getProjectEnvironmentWithDatabases method uses summary mode (not full objects)
  • Only adds dragonflys/keydbs/clickhouses arrays if databases of those types exist
  • environments get action now uses enhanced method
  • Fixed: API returns database_type not type, environment_id not environment_uuid

Why this is better than PR #91

  • Uses summary mode (~100 bytes/db) instead of full objects (~2KB/db)
  • Same two API calls, but much smaller payload
  • Correct API field names (verified against real Coolify)

Test plan

  • npm test - 220 tests passing
  • Tested against real Coolify instance with dragonfly database - ✅ Works
Result keys: ['id', 'uuid', 'name', 'applications', 'description', 'mariadbs', 
              'mongodbs', 'mysqls', 'postgresqls', 'project_id', 'redis', 
              'services', 'created_at', 'updated_at', 'dragonflys']

Dragonflys: [{
  uuid: 'po0ogkcwkskso844s8wck4wg',
  name: 'portfolio-dragonfly',
  type: 'standalone-dragonfly',
  status: 'running:healthy',
  environment_id: 6
}]

Fixes #88

+167
additions
-3
deletions
5
files changed