2

Quarkus version 2.16.7.Final. Datasource is Postgresql:12.4. Everything is default wrt dev services except the below settings:

    datasource:
      db-kind: postgresql
      devservices:
        image-name: artifactory.{"image-name"}/postgres:12.4
        port: 5000

I run the app using mvn quarkus:dev. When I shutdown or kill the server the Postgresql container continues to run (It used to shutdown cleanly along with the server before). I have to manually stop the container every time I want to start the server again.

Keycloack and ryuk containers are shutting down with server but the postgres container staying alive.

I tried to set testcontainers.reuse.enable=false but it doesn't help.

2
  • Sounds like a bug, can you please open an issue at github.com/quarkusio/quarkus/issues? Thanks Commented Jun 13, 2023 at 8:17
  • did you by any chance open a bug? i am also facing this issue and wonder if there's a solution Commented Jun 25, 2023 at 12:59

2 Answers 2

0

The suggestion from https://github.com/quarkusio/quarkus/issues/34294 helped me. However, I still have no idea why it only occurs with the Postgres container.

Sign up to request clarification or add additional context in comments.

1 Comment

Under the hood, Quarkus uses github.com/testcontainers/testcontainers-java to manage containers. I can imagine, Quarkus has some code for some of the Dev Services, that sets withReuse(true), which only triggers, if you also set testcontainers.reuse.enable=true in your properties. And seems this is not set for Keycloak (which triggers creation of Ryuk for cleanup in the first place).
0
quarkus.datasource.devservices.reuse

Use this property in application.properties

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.