Skip to content

-U postgres might be needed in the PostgreSQL service healthcheck #68

Description

@bzp99

Andrés Zapata reported that he needed to make the following change to get the test network running:

diff --git a/test-env/common-services.yml b/test-env/common-services.yml                                                                                  
index 7861819..82224b3 100755                                                                                                                             
--- a/test-env/common-services.yml                                                                                                                        
+++ b/test-env/common-services.yml                                                                                                                        
@@ -22,7 +22,7 @@ services:                                                                                                                               
       POSTGRES_DB: dva                                                                                                                                   
       POSTGRES_PASSWORD: postgres                                                                                                                        
     healthcheck:                                                                                                                                         
-      test: pg_isready                                                                                                                                   
+      test: pg_isready -U postgres                                                                                                                       
       interval: 5s                                                                                                                                       
       timeout: 5s                                                                                                                                        
       retries: 5     

Quoting his email:

In the first modification, the compose was failing to start. It seems that, by default, the version of postgres that docker downloaded in my side was using a different user by default and postgres user had to be specified explicitly.

This seems to be a likely cause.

We should check what version is configured and add the option if really needed (or constrain the version further).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cicdRelated to CI/CD

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions