Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgres-ai/postgres_ai
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: postgres-ai/postgres_ai
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/remove-hardcoded-credentials
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 10 commits
  • 10 files changed
  • 2 contributors

Commits on Sep 30, 2025

  1. fix: Remove hardcoded credentials and implement environment variables

    This commit addresses Critical Issue #1 from the security audit by
    removing all hardcoded credentials and replacing them with environment
    variables.
    
    Changes:
    - Created .env.example template with all required environment variables
    - Added init-sql-generator service to process SQL templates with envsubst
    - Created init-template.sql files for sink-postgres and target-db
    - Updated docker-compose.yml to use environment variables for all credentials
    - Updated Grafana datasources.yml to use environment variables
    - Updated .gitignore to exclude .env and generated init.sql files
    - Added comprehensive SECURITY_SETUP.md documentation
    
    Security improvements:
    - No credentials stored in version control
    - All passwords configurable via .env file
    - Template system allows secure credential injection
    - Documentation for secure deployment practices
    
    Closes #1
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    7dcd5e6 View commit details
    Browse the repository at this point in the history
  2. docs: Update README and fix pgwatch-postgres configuration

    Changes:
    - Added Environment Configuration section to README explaining .env usage
    - Updated Access points section with correct default credentials
    - Fixed pgwatch-postgres command to use simple array format with
      docker-compose variable substitution instead of shell interpolation
    - Added create_issues.sh script for issue management
    
    Testing:
    - All services start successfully with default environment variables
    - Grafana accessible at localhost:3000 (monitor/changeme)
    - Prometheus collecting metrics from pgwatch
    - PostgreSQL databases initialized with correct credentials
    - pgwatch-postgres now connects successfully to sink database
    
    Related to MR !56
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    5ac0438 View commit details
    Browse the repository at this point in the history
  3. refactor: Remove unnecessary files and fix documentation style

    Removed:
    - SECURITY_SETUP.md (unnecessary extra file, info moved to .env.example)
    - create_issues.sh (issues already created, script no longer needed)
    
    Updated:
    - README.md: Removed emoji from section title, removed reference to
      deleted SECURITY_SETUP.md, now references .env.example directly
    
    Follows project core principles: avoid creating extra files unless
    absolutely necessary.
    
    Related to MR !56
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    3dee317 View commit details
    Browse the repository at this point in the history
  4. style: Use consistent Postgres terminology in configuration

    Changed 'PostgreSQL' to 'Postgres' in .env.example to align with
    project terminology standards (prefer 'Postgres' over 'PostgreSQL').
    
    Also updated section headers to use sentence-style capitalization.
    
    Related to MR !56
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    ba5a25e View commit details
    Browse the repository at this point in the history
  5. style: Apply SQL style guide to template files

    Changed all SQL keywords to lowercase per project SQL style guide:
    - create/grant/alter instead of CREATE/GRANT/ALTER
    - select/from/where/join instead of SELECT/FROM/WHERE/JOIN
    - Data types: timestamptz/text/jsonb instead of TIMESTAMPTZ/TEXT/JSONB
    - PL/pgSQL keywords: declare/begin/end/if/return (lowercase)
    
    Added explicit 'as' for aliases in queries.
    Improved formatting for multi-line statements with proper indentation.
    
    Follows .cursor/rules/development__db-sql-style-guide.mdc
    
    Related to MR !56
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    889fdc3 View commit details
    Browse the repository at this point in the history
  6. style: Add backticks to technical terms in README

    Added backticks around technical terms for better readability:
    - Connection strings: postgresql://...
    - Service names: pgwatch-postgres
    - Configuration files: pg_hba
    - Extensions: pg_stat_statements
    
    Improves clarity and follows documentation best practices.
    
    Related to MR !56
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    ff214b9 View commit details
    Browse the repository at this point in the history
  7. fix: Correct version number to v0.10

    Changed 'As of v2.0' to 'As of v0.10' to reflect actual project
    versioning.
    
    Related to MR !56
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    817258d View commit details
    Browse the repository at this point in the history
  8. docs: Add production .env setup reminder to Quick start

    Added explicit reminder to configure .env before running quickstart
    in production. Links to Environment configuration section for details.
    
    Related to MR !56
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    476e379 View commit details
    Browse the repository at this point in the history
  9. fix: Address MR review comments

    - Remove hardcoded password from instances.yml, use environment variables
    - Update sources-generator to process environment variables with envsubst
    - Remove version reference from README (assume fresh install)
    - Change nano to vi in README installation instructions
    
    Related to MR !56
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    eb67436 View commit details
    Browse the repository at this point in the history
  10. fix: Resolve envsubst and password consistency issues

    Three critical fixes for production deployment:
    
    1. Fixed envsubst to only substitute specific variables
       - Added explicit variable lists to envsubst commands
       - Prevents substitution of PostgreSQL $user keyword
       - Resolves "zero-length delimited identifier" error
    
    2. Fixed password consistency across services
       - Changed TARGET_MONITOR_PASSWORD default from monitor_pass to changeme
       - Ensures init-sql-generator and sources-generator use same password
       - Resolves authentication failures between pgwatch and target-db
    
    3. Added sslmode=disable to connection string
       - Postgres containers don't have SSL configured by default
       - Prevents TLS connection errors
    
    Tested with clean installation:
    - All 8 services start successfully
    - Grafana accessible with monitor/changeme credentials
    - pgwatch-postgres connects and fetches metrics
    - No authentication or initialization errors
    
    Related to MR !56
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <[email protected]>
    NikolayS and claude committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    89b4d17 View commit details
    Browse the repository at this point in the history
Loading