Skip to content

Conversation

@nishantxscooby
Copy link

Problem

Running python manage.py dbshell inside the buffalogs Django container fails with:

CommandError: You appear not to have the 'psql' program installed or on your path.

This makes it impossible to inspect the database from inside the container.

Steps to Reproduce

  1. Run the stack with:

    docker compose up -d

  2. Enter the Django container:

    docker compose exec buffalogs bash
    python manage.py dbshell

  3. Observe the error above.

Fix

Added postgresql-client to the apt dependencies in build/Dockerfile so the psql binary is available inside the Django container.

Verification

After rebuilding the image:

docker compose exec buffalogs bash
command -v psql
python manage.py dbshell

dbshell now opens correctly.

@nishantxscooby
Copy link
Author

Hi maintainers,
this PR fixes the missing psql binary in the Django container so manage.py dbshell works correctly.
Happy to make any changes if needed. Thanks for the review!

@Lorygold
Copy link
Collaborator

Lorygold commented Jan 6, 2026

One consideration: postgresql-client is only needed for development/debugging and not for the application at runtime.

Would it make sense to query the database directly from the Postgres container (> docker compose exec postgres psql -U user dbname) instead of adding this dependency to the buffalogs application container?

@Lorygold Lorygold marked this pull request as draft January 7, 2026 11:35
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.

2 participants