Skip to content

feat: local Postgres, schema on first use, initial data pull - #37

Merged
surrealwolf merged 1 commit into
mainfrom
efficiency
Mar 29, 2026
Merged

feat: local Postgres, schema on first use, initial data pull#37
surrealwolf merged 1 commit into
mainfrom
efficiency

Conversation

@surrealwolf

Copy link
Copy Markdown
Collaborator

Summary

  • Local Postgres: docker-compose postgres service; Makefile targets postgres-up, postgres-down, local-up, local-down
  • .env.example: PostgreSQL URL for local runs (replaces sqlite example)
  • Schema on first use: _get_pool() calls _init_db() so tables exist before first read (fixes 'relation does not exist' on health/war status)
  • Initial pull: collector runs one full collection on startup so MCP/UI have data immediately while interval runs

Made with Cursor

- Add Postgres service to docker-compose; API uses DATABASE_URL
- Makefile: postgres-up, postgres-down, local-up, local-down
- .env.example: PostgreSQL URL for local runs
- Ensure DB schema created on first use (_get_pool calls _init_db)
- Run initial data collection on startup so MCP/UI have data immediately

Made-with: Cursor
@surrealwolf
surrealwolf merged commit 002c986 into main Mar 29, 2026
9 checks passed
@surrealwolf
surrealwolf deleted the efficiency branch March 29, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant