netbox-docker
netbox-docker copied to clipboard
add psql client for dbshell
Related Issue: #817
New Behavior
Fixes dbshell
Contrast to Current Behavior
dbshell no longer works with new image
Discussion: Benefits and Drawbacks
Working dbshell
Changes to the Wiki
N/A
Proposed Release Note Entry
Update image to include psql client to fix dbshell access in netbox container.
Double Check
- [X] I have read the comments and followed the PR template.
- [X] I have explained my PR according to the information in the comments.
- [X] My PR targets the
develop
branch.
something up with the github actions?
For some reason postgresql-client
pulls in a bunch of perl
requirements. Which ware definitely not needed for Netbox. So I'm hesitant to merge this. @cimnine What do you think?
If we wan't to merge, this should target develop
and not release
.
hmm I meant to set a PR for develop and not release. My bad.
With our compose-based setup one can access the database client psql
easily through docker compose exec postgres sh -c 'psql -U $POSTGRES_USER $POSTGRES_DB'
. Personally, I don't see the need for postgres-client
in the container when it's not required to run NetBox.
With our compose-based setup one can access the database client
psql
easily throughdocker compose exec postgres sh -c 'psql -U $POSTGRES_USER $POSTGRES_DB'
. Personally, I don't see the need forpostgres-client
in the container when it's not required to run NetBox.
I agree with you, but it breaks docker compose run --rm netbox /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py dbshell
✅ Initialisation is done.
🧬 loaded config '/etc/netbox/config/configuration.py'
🧬 loaded config '/etc/netbox/config/extra.py'
🧬 loaded config '/etc/netbox/config/logging.py'
🧬 loaded config '/etc/netbox/config/plugins.py'
CommandError: You appear not to have the 'psql' program installed or on your path.
It's true, but that's just a shortcut into the psql shell anyway, isn't it?
fair enough, we could just add a blurb on the wiki
Added an explanation to the wiki.