Sign inSign up

healthsamurai/aidboxdb

By healthsamurai

•Updated 12 months ago

AidboxDB is a custom build of PostgreSQL database that used as Aidbox data storage.

Image
9

1M+

healthsamurai/aidboxdb repository overview

⁠AidboxDB

AidboxDB image is a custom build of open source PostgreSQL database. Aidbox uses it as data storage. You can find more detailed informaion in our documentation⁠.

docker run \
       -v "$(pwd)"/pgdata:/data/pg \
       -e POSTGRES_USER='postgres' \
       -e POSTGRES_PASSWORD='pass' \
       -e POSTGRES_DB='aidbox' \
       -e PGDATA="/data/pg" \
       healthsamurai/aidboxdb:14.5

The AidboxDB image use cases are:

  • To initialize and run a master database for Aidbox to work with
  • To initialize and run a streaming replica
  • Optimized FHIR search queries
  • Backup and maintenance extensions
⁠Versioning

AidboxDB image is tagged by PostgreSQL version from which it is built. For example, if you want to use 14.5 PostgreSQL version you should pull healthsamurai/aidboxdb:14.5⁠ image.

Supported PostgreSQL versions: 15 (beta)⁠, 14.5⁠, 13.8⁠

Available versions: 14.2⁠, 13.6⁠, 13.2⁠, 12.12⁠, 12.6⁠, 11.17⁠, 11.11⁠

⁠Extensions

List of additional availiable extensions:

  • jsonknife⁠ — Jsonb extraction tool for optimizing FHIR search
  • pgagent⁠ — A PostgreSQL job scheduler
  • pg_repack⁠ — Reorganize tables in PostgreSQL databases with minimal locks
  • jsquery⁠ — JSON query language with GIN indexing support
  • wal2json⁠ — Is an output plugin for logical decoding
  • wal-g⁠ — Archival and Restoration for databases in the Cloud
⁠Configuration

The image is configured by supplying environment variables and command line arguments on startup. Keep in mind that you should not change the environment variables once you have initialized the database. The image expects them to be immutable.

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. /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.

Tag summary

Content type

Image

Digest

sha256:261ba691e…

Size

244.4 MB

Last updated

12 months ago

docker pull healthsamurai/aidboxdb:18