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

Fix PostgreSQL waiting strategy for image from Red Hat container registry #1305

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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