fix(cli): pass Grafana password directly to Docker during local-install
Summary
Fixes the bug where the Grafana password shown after mon local-install doesn't work, even on a fresh install.
Problem
The password shown to the user didn't work because of a silent failure in the code:
- Step 4 generates password and saves to
.pgwatch-config - Step 5 calls
runCompose()which re-reads.pgwatch-config -
Bug: If reading/parsing fails, the
catchblock silently continues without settingGF_SECURITY_ADMIN_PASSWORD - Docker falls back to default password
demo(fromdocker-compose.yml) - User sees generated password but Grafana has
demo
Solution
Pass the password directly to runCompose() when we already have it in memory (during local-install), instead of relying on re-reading the file.
Changes
- Added optional
grafanaPasswordparameter torunCompose()function - Modified logic to use passed password first, then fall back to reading from
.pgwatch-config - Pass
grafanaPasswordtorunCompose()in thelocal-installStep 5
Closes #79 (closed)