Required environment variables

Env variable nameMeaning
POSTGRES_USERName of the user that will be created during db initialization
POSTGRES_PASSWORDPassword for that user
POSTGRES_DBName of the database to be created on startup
WALG_ variablesCredentials for storage and bucket name for wal-g to use. Refer to the official docs for the details.

Optional environment variables

Env variable nameDefaultMeaning
PGDATAPath to the postgresql cluster directory in the filesystem. /var/lib/postgresql/data by default.
PG_ROLEWhen set to "replica" image proceeds to the streaming replica mode
PG_REPLICAName of the replication slot to be created in master database. Should only contain lower case letters, numbers, and the underscore character.
PG_MASTER_HOSTMaster database host for streaming replica
PGAGENT_ENABLED

When present and PG_ROLE is not set to "replica" starts pgagent daemon on aidboxdb start.

pgAgent tutorial

PGAGENT_DBValue ofPOSTGRES_DB variableDatabase where pgagent data is stored. If value is set, then database must exist on container start up.
PGAGENT_LOG_FILE_PATH"/tmp/pgagent.logs"Path to file where pgagent messages are logged
PGAGENT_LOG_LEVEL00 error, 1 warning, 2 debug.
PGAGENT_USERpostgresIf you want to use custom user for pgagent you can specify in this variable.
PGAGENT_PASSWORDValue of POSTGRES_PASSWORD variablePassword for custom pgagent user.
EXTRA_LOCALESAdds locales for PostgreSQL to work with. May pass many locales, must be separated by comma.

Last updated 2025-08-05T16:21:53Z