Skip to content

Commit

Permalink
Fix PostgreSQL waiting strategy for RH image
Browse files Browse the repository at this point in the history
(cherry picked from commit 1fd76ac)
  • Loading branch information
michalvavrik committed Sep 13, 2024
1 parent 5b3fa8d commit 72b8862
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

public class PostgresqlService extends DatabaseService<PostgresqlService> {

/**
* Red Hat PostgreSQL container image at certain point redirects logs to a file.
* This is name of property that determines destination.
* More info here:
* https://github.com/sclorg/postgresql-container/blob/master/16/root/usr/share/container-scripts/postgresql/README.md
*/
static final String LOG_DESTINATION = "POSTGRESQL_LOG_DESTINATION";
static final String USER_PROPERTY = "POSTGRESQL_USER";
static final String PASSWORD_PROPERTY = "POSTGRESQL_PASSWORD";
static final String DATABASE_PROPERTY = "POSTGRESQL_DATABASE";
Expand All @@ -23,6 +30,7 @@ public PostgresqlService onPreStart(Action action) {
withProperty(USER_PROPERTY, getUser());
withProperty(PASSWORD_PROPERTY, getPassword());
withProperty(DATABASE_PROPERTY, getDatabase());
withProperty(LOG_DESTINATION, "/dev/stdout");

// DockerHub environment variables
withProperty(DH_USER_PROPERTY, getUser());
Expand Down

0 comments on commit 72b8862

Please sign in to comment.