Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PostgreSQL in official docker image #3766

Open
jhass opened this issue Apr 13, 2023 · 2 comments
Open

Support PostgreSQL in official docker image #3766

jhass opened this issue Apr 13, 2023 · 2 comments

Comments

@jhass
Copy link

jhass commented Apr 13, 2023

Could you please install psycopg2 in the official docker image, or create a variant with it installed? PostgreSQL seems well supported with DATABASE_ENGINE=transaction_hooks.backends.postgresql_psycopg2 otherwise.

Having to run apt-get update; apt-get install -y python3-dev libpq-dev build-essential; pip3 install psycopg2; source /var/local/ralph/docker-entrypoint.sh as the entrypoint seems a little silly... :)

@ar4s
Copy link
Contributor

ar4s commented Apr 20, 2023

Hello, you can also do this more efficiently and in a more user-friendly way. Try inheriting from the base image by writing your own Dockerfile with an additional package. Try this:

FROM allegro/ralph

# Install additional packages
RUN pip3 install psycopg2-binary==2.7.4

and run docker build -t psyco-ralph . and use psyco-ralph image in your stack (docker-compose?).

@jhass
Copy link
Author

jhass commented Apr 21, 2023

I'm doing this right now, yes.

It's just one more thing to maintain, or given I'm running on k8s it's a custom docker registry and build process just for this, while I imagine publishing another tag should be a fairly minor addition to your build pipeline 🙂

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

No branches or pull requests

2 participants