Skip to content

Commit

Permalink
Merge pull request #1305 from michalvavrik/feature/fix-rh-postgresql-…
Browse files Browse the repository at this point in the history
…logging-strategy

Fix PostgreSQL waiting strategy for image from Red Hat container registry
  • Loading branch information
michalvavrik authored Sep 12, 2024
2 parents 909b6bc + 1fd76ac commit 4264e4c
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 4264e4c

Please sign in to comment.