getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.52k stars 4.12k forks source link

support docker-compose run web django dbshell #30380

Open rrauenza opened 2 years ago

rrauenza commented 2 years ago

Problem Statement

I would like to be able to run dbshell from 'run web django dbshell'...

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

Solution Brainstorm

I think this is low hanging fruit -- the dockerfile just needs to install the postgres psql client package: postgresql-client

getsentry-release commented 2 years ago

Routing to @getsentry/open-source for triage. ⏲️

chadwhitacre commented 2 years ago

This is re: self-hosted (formerly onpremise), yes @rrauenza? If so we'll move the conversation there ...

chadwhitacre commented 2 years ago

Hrm, actually I guess for this to work we'd need to modify this Dockerfile, right?

rrauenza commented 2 years ago

Yes, I think that's the file. Whatever supports the "web django" command, which that looks like it.

a

RUN apt-get install postgresql-client

should do it... (Do you need to pin the client to 9.x as well?)

If there are unit tests, a 'docker-compose run web django dbshell' -- or is it web sentry django dbshell?

chadwhitacre commented 2 years ago

Putting on the backlog, need to figure out who's going to care if we change this Dockerfile. How is this consumed besides in self-hosted? Security concerns? Performance/size concerns?