{"id":16368095,"url":"https://github.com/bfren/docker-postgresql","last_synced_at":"2026-03-10T13:05:18.415Z","repository":{"id":37041938,"uuid":"415824119","full_name":"bfren/docker-postgresql","owner":"bfren","description":"Docker PostgreSQL image with automatic backups.","archived":false,"fork":false,"pushed_at":"2026-03-02T11:56:53.000Z","size":267,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-02T15:35:57.371Z","etag":null,"topics":["backup","docker","docker-postgresql","postgresql","postgresql-server"],"latest_commit_sha":null,"homepage":"","language":"Nushell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"bfren","patreon":"bfren"}},"created_at":"2021-10-11T07:35:53.000Z","updated_at":"2026-01-28T22:51:13.000Z","dependencies_parsed_at":"2024-01-13T12:37:45.560Z","dependency_job_id":"1632214a-29f4-4344-af57-c2d8769bcfcf","html_url":"https://github.com/bfren/docker-postgresql","commit_stats":null,"previous_names":[],"tags_count":136,"template":false,"template_full_name":null,"purl":"pkg:github/bfren/docker-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfren","download_url":"https://codeload.github.com/bfren/docker-postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30334412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","docker","docker-postgresql","postgresql","postgresql-server"],"created_at":"2024-10-11T02:51:38.306Z","updated_at":"2026-03-10T13:05:18.410Z","avatar_url":"https://github.com/bfren.png","language":"Nushell","readme":"# Docker PostgreSQL\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/bfren/docker-postgresql) ![Docker Pulls](https://img.shields.io/endpoint?url=https%3A%2F%2Fbfren.dev%2Fdocker%2Fpulls%2Fpostgresql) ![Docker Image Size](https://img.shields.io/endpoint?url=https%3A%2F%2Fbfren.dev%2Fdocker%2Fsize%2Fpostgresql) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bfren/docker-postgresql/dev.yml?branch=main)\n\n[Docker Repository](https://hub.docker.com/r/bfren/postgresql) - [bfren ecosystem](https://github.com/bfren/docker)\n\n[PostgreSQL](https://www.postgresql.org/) comes pre-installed (12, 13, 14, 15, 16, 17 and 18) with automatic backups built-in.\n\n## Contents\n\n* [Automatic Backups](#automatic-backups)\n* [Ports](#ports)\n* [Volumes](#volumes)\n* [Environment Variables](#environment-variables)\n* [Helper Functions](#helper-functions)\n* [Licence / Copyright](#licence)\n\n## Automatic Backups\n\nBackups for every database are stored:\n\n* in the `/backup` volume\n* in subfolders by date and time (yyMMddhhmm)\n* every eight hours\n\nSee [For Backups](#for-backups) for configuration variables.\n\n## Ports\n\n* 5432\n\n## Volumes\n\n| Volume    | Purpose                                                                                           |\n| --------- | ------------------------------------------------------------------------------------------------- |\n| `/backup` | Backup files (also used for export / import scripts - see [helper functions](#helper-functions)). |\n| `/data`   | Data files.                                                                                       |\n\n## Environment Variables\n\n### For Backups\n\n| Variable                      | Values                                                                    | Description                                           | Default   |\n| ----------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------- | --------- |\n| `BF_PG_BACKUP_COMPRESS_FILES` | 0 or 1                                                                    | Whether or not to compress backup files (using bzip). | 0         |\n| `BF_PG_BACKUP_KEEP_FOR`       | [Nu duration](https://www.nushell.sh/book/types_of_data.html#durations)   | The length of time to keep backups.                   | 28day     |\n\n### For Database\n\n| Variable              | Values | Description                                                                                                      | Default   |\n| --------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- | --------- |\n| `BF_PG_APPLICATION`   | string | Application name - will be used as `BF_PG_DATABASE`, `BF_PG_PASSWORD` and `BF_PG_USERNAME` if they are not set.  | *None*    |\n| `BF_PG_DATABASE`      | string | Database name(s) - multiple databases can be separated by a comma.                                               | *None*    |\n| `BF_PG_PASSWORD`      | string | Application password - required if `BF_PG_APPLICATION` is not                                                    | *None*    |\n| `BF_PG_USERNAME`      | string | Application username - required if `BF_PG_APPLICATION` is not used.                                              | *None*    |\n\n## Helper Functions\n\n| Function      | Arguments         | Purpose                                                                               | Usage                                                 |\n| ------------- | ----------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------- |\n| `pg-dump`     | *None*            | Run backup manually.                                                                  | `docker exec \u003c\u003cCONTAINER\u003e\u003e pg-dump`                   |\n| `pg-export`   | 1: Database name  | Dumps the specified database as a SQL file to the root of the `/backup` volume.       | `docker exec \u003c\u003cCONTAINER\u003e\u003e pg-export \u003c\u003cDB_NAME\u003e\u003e`     |\n| `pg-import`   | 1: Database name  | Executes all files in the root of the `/backup` volume.                               | `docker exec \u003c\u003cCONTAINER\u003e\u003e pg-import \u003c\u003cDB_NAME\u003e\u003e`     |\n| `pg-restore`  | 1: Backup set     | Deletes all files in `/data` volume, then restores from the specified backup dump.    | `docker exec \u003c\u003cCONTAINER\u003e\u003e pg-restore 202107180500`   |\n\n## Licence\n\n\u003e [MIT](https://mit.bfren.dev/2021)\n\n## Copyright\n\n\u003e Copyright (c) 2021-2026 [bfren](https://bfren.dev) (unless otherwise stated)\n","funding_links":["https://github.com/sponsors/bfren","https://patreon.com/bfren"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfren%2Fdocker-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfren%2Fdocker-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfren%2Fdocker-postgresql/lists"}