Sign inSign up

bfren/postgresql

By bfren

•Updated 6 days ago

Image
0

50K+

bfren/postgresql repository overview

⁠Docker PostgreSQL

GitHub release (latest by date) Docker Pulls Docker Image Size GitHub Workflow Status

Docker Repository⁠ - bfren ecosystem⁠

PostgreSQL⁠ comes pre-installed (12, 13, 14, 15, 16, 17 and 18) with automatic backups built-in.

⁠Contents

⁠Automatic Backups

Backups for every database are stored:

  • in the /backup volume
  • in subfolders by date and time (yyMMddhhmm)
  • every eight hours

See For Backups⁠ for configuration variables.

⁠Ports

  • 5432

⁠Volumes

VolumePurpose
/backupBackup files (also used for export / import scripts - see helper functions⁠).
/dataData files.

⁠Environment Variables

⁠For Backups
VariableValuesDescriptionDefault
BF_PG_BACKUP_COMPRESS_FILES0 or 1Whether or not to compress backup files (using bzip).0
BF_PG_BACKUP_KEEP_FORNu duration⁠The length of time to keep backups.28day
⁠For Database
VariableValuesDescriptionDefault
BF_PG_APPLICATIONstringApplication name - will be used as BF_PG_DATABASE, BF_PG_PASSWORD and BF_PG_USERNAME if they are not set.None
BF_PG_DATABASEstringDatabase name(s) - multiple databases can be separated by a comma.None
BF_PG_PASSWORDstringApplication password - required if BF_PG_APPLICATION is notNone
BF_PG_USERNAMEstringApplication username - required if BF_PG_APPLICATION is not used.None

⁠Helper Functions

FunctionArgumentsPurposeUsage
pg-dumpNoneRun backup manually.docker exec <<CONTAINER>> pg-dump
pg-export1: Database nameDumps the specified database as a SQL file to the root of the /backup volume.docker exec <<CONTAINER>> pg-export <<DB_NAME>>
pg-import1: Database nameExecutes all files in the root of the /backup volume.docker exec <<CONTAINER>> pg-import <<DB_NAME>>
pg-restore1: Backup setDeletes all files in /data volume, then restores from the specified backup dump.docker exec <<CONTAINER>> pg-restore 202107180500

⁠Licence

Copyright (c) 2021-2026 bfren⁠ (unless otherwise stated)

Tag summary

Content type

Image

Digest

sha256:3a70946a9…

Size

42.6 MB

Last updated

6 days ago

docker pull bfren/postgresql:postgresql13.20-4.2.11