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

Setup PostgreSQL cluster in docker compose for local development #208

Open
mfvanek opened this issue Mar 22, 2022 · 5 comments
Open

Setup PostgreSQL cluster in docker compose for local development #208

mfvanek opened this issue Mar 22, 2022 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mfvanek
Copy link
Owner

mfvanek commented Mar 22, 2022

See
https://hub.docker.com/r/paunin/postgresql-cluster-pgsql/
and
https://habr.com/ru/post/334484/

@Evreke
Copy link
Collaborator

Evreke commented Jun 6, 2022

I am working on mfvanek/pg-index-health#121 and faced some problems trying to start cluster from resources provided by you.

postgres-cluste-pgsql it looks nice, but it hasn't been updated for a long time, so the latest version doesn't work, since some changes have been made to the repositories referenced by docker files.

pg-dock is not working either but seems more simpler to fix than first one.

There are two ways i see.

  1. Fix one of two provided solutions to use them.
  2. Provide new solution.

Personally i prefer first way.

@mfvanek
Copy link
Owner Author

mfvanek commented Jun 6, 2022

@Evreke
Let's take a look at bitnami containers https://github.com/bitnami/bitnami-docker-postgresql

@Evreke
Copy link
Collaborator

Evreke commented Oct 11, 2022

For local development you can use default bitnami postgresql container with repmgr.
It works like a charm. I used it working on mfvanek/pg-index-health#121

@Evreke
Copy link
Collaborator

Evreke commented Dec 21, 2022

Sorry, I've been busy for a long time.
I am starting to work on this task. @mfvanek

@Evreke
Copy link
Collaborator

Evreke commented Dec 28, 2022

With afb84a5 I add plugin that searches and run containers defined in docker-compose file.

This approach hash drawbacks:

  • gradle tasks must be used to start project.
  • you need to connect to the debugger after running the application in debug mode, otherwise it will not progress further.
  • if you try to stop application your build will be canceled so composeDown task won't run. I guess it's because of gradle misconfiguration.
  • the most serious disadvantage is the inability to programmatically manage the cluster.

But advantages are:

  • a more concise way to add services is to simply add them to the compose file.
  • probably the fastest way to integrate into a cluster and test hypotheses.

@mfvanek mfvanek added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels May 4, 2024
@mfvanek mfvanek transferred this issue from mfvanek/pg-index-health-spring-boot-demo May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants