{"id":13567675,"url":"https://github.com/zonkyio/embedded-postgres-binaries","last_synced_at":"2026-02-18T17:05:24.110Z","repository":{"id":39987218,"uuid":"135821683","full_name":"zonkyio/embedded-postgres-binaries","owner":"zonkyio","description":"Lightweight bundles of PostgreSQL binaries with reduced size intended for testing purposes.","archived":false,"fork":false,"pushed_at":"2025-02-23T12:41:28.000Z","size":406,"stargazers_count":174,"open_issues_count":5,"forks_count":35,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-16T11:02:47.512Z","etag":null,"topics":["embedded-postgresql","postgres","postgresql","postgresql-database"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zonkyio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-06-02T13:51:56.000Z","updated_at":"2025-05-08T16:37:48.000Z","dependencies_parsed_at":"2023-11-10T12:43:24.950Z","dependency_job_id":"70c42cf8-1d8f-479e-a6a6-00b2b80c4c15","html_url":"https://github.com/zonkyio/embedded-postgres-binaries","commit_stats":null,"previous_names":[],"tags_count":196,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonkyio%2Fembedded-postgres-binaries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonkyio%2Fembedded-postgres-binaries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonkyio%2Fembedded-postgres-binaries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonkyio%2Fembedded-postgres-binaries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zonkyio","download_url":"https://codeload.github.com/zonkyio/embedded-postgres-binaries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518383,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["embedded-postgresql","postgres","postgresql","postgresql-database"],"created_at":"2024-08-01T13:02:38.847Z","updated_at":"2026-02-18T17:05:24.055Z","avatar_url":"https://github.com/zonkyio.png","language":"Shell","readme":"# \u003cimg src=\"zonky.jpg\" height=\"100\"\u003e Embedded Postgres Binaries\n\n## Introduction\n\nThis project provides lightweight bundles of PostgreSQL binaries with reduced size that are intended for testing purposes.\nIt is a supporting project for the primary [io.zonky.test:embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) and [io.zonky.test:embedded-postgres](https://github.com/zonkyio/embedded-postgres) projects.\nHowever, with a little effort, the embedded binaries can also be integrated with other projects.\n\n## Provided features\n\n* Lightweight bundles of PostgreSQL binaries with reduced size (~10MB)\n* Embedded PostgreSQL 11+ binaries even for Linux platform\n* Configurable version of PostgreSQL binaries\n\n## Projects using the embedded binaries\n\n* [zonkyio/embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) (Java - Spring)\n* [zonkyio/embedded-postgres](https://github.com/zonkyio/embedded-postgres) (Java)\n* [hgschmie/pg-embedded](https://github.com/hgschmie/pg-embedded) (Java)\n* [fergusstrange/embedded-postgres](https://github.com/fergusstrange/embedded-postgres) (Go)\n* [theseus-rs/postgresql-embedded](https://github.com/theseus-rs/postgresql-embedded) (Rust)\n* [faokunega/pg-embed](https://github.com/faokunega/pg-embed) (Rust)\n* [leinelissen/embedded-postgres](https://github.com/leinelissen/embedded-postgres) (NodeJS)\n\n## Postgres version\n\nThe version of the postgres binaries can be managed by importing `embedded-postgres-binaries-bom` in a required version in your dependency management section.\n\n```xml\n\u003cdependencyManagement\u003e\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eio.zonky.test.postgres\u003c/groupId\u003e\n            \u003cartifactId\u003eembedded-postgres-binaries-bom\u003c/artifactId\u003e\n            \u003cversion\u003e16.0.0\u003c/version\u003e\n            \u003ctype\u003epom\u003c/type\u003e\n            \u003cscope\u003eimport\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/dependencyManagement\u003e\n```\n\nA list of all available versions of postgres binaries is here: https://mvnrepository.com/artifact/io.zonky.test.postgres/embedded-postgres-binaries-bom\n\n## Supported architectures\n\nBy default, only dependencies for `amd64` architecture, in the [io.zonky.test:embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) and [io.zonky.test:embedded-postgres](https://github.com/zonkyio/embedded-postgres) projects, are included.\nSupport for other architectures can be enabled by adding the corresponding Maven dependencies as shown in the example below.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.zonky.test.postgres\u003c/groupId\u003e\n    \u003cartifactId\u003eembedded-postgres-binaries-linux-i386\u003c/artifactId\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n**Supported platforms:** `Darwin`, `Windows`, `Linux`, `Alpine Linux`  \n**Supported architectures:** `amd64`, `i386`, `arm32v6`, `arm32v7`, `arm64v8`, `ppc64le`\n\nNote that not all architectures are supported by all platforms, you can find an exhaustive list of all available artifacts here: https://mvnrepository.com/artifact/io.zonky.test.postgres\n\n## Building from Source\nThe project uses a [Gradle](http://gradle.org)-based build system. In the instructions\nbelow, [`./gradlew`](http://vimeo.com/34436402) is invoked from the root of the source tree and serves as\na cross-platform, self-contained bootstrap mechanism for the build.\n\n### Prerequisites\n\n[Git](http://help.github.com/set-up-git-redirect), [JDK 6 or later](http://www.oracle.com/technetwork/java/javase/downloads) and [Docker](https://www.docker.com/get-started)\n\nBe sure that your `JAVA_HOME` environment variable points to the `jdk1.6.0` folder\nextracted from the JDK download.\n\nCompiling non-native architectures rely on emulation, so it is necessary to register `qemu-*-static` executables:\n   \n`docker run --rm --privileged multiarch/qemu-user-static:register --reset`\n\n**Note that the complete build of all supported architectures is now supported only on Linux platform.**\n\n### Check out sources\n`git clone git@github.com:zonkyio/embedded-postgres-binaries.git`\n\n### Make complete build\n\nBuilds all supported artifacts for all supported platforms and architectures, and also builds a BOM to control the versions of postgres binaries.\n\n`./gradlew clean install --parallel -Pversion=10.6.0 -PpgVersion=10.6`\n\nNote that the complete build can take a very long time, even a few hours, depending on the performance of the machine on which the build is running.\n\n### Make partial build\n\nBuilds only binaries for a specified platform/submodule.\n\n`./gradlew clean :repacked-platforms:install -Pversion=10.6.0 -PpgVersion=10.6`\n\n### Build only a single binary\n\nBuilds only a single binary for a specified platform and architecture.\n\n`./gradlew clean install -Pversion=10.6.0 -PpgVersion=10.6 -ParchName=arm64v8 -PdistName=alpine`\n\nIt is also possible to include the PostGIS extension by passing the `postgisVersion` parameter, e.g. `-PpostgisVersion=2.5.2`. Note that this option is not (yet) available for Windows and Mac OS platforms.\n\nOptional parameters:\n- *postgisVersion*\n  - default value: unset\n  - supported values: a postgis version number (only 2.5.2+, 2.4.7+, 2.3.9+ versions are supported)\n- *archName*\n  - default value: `amd64`\n  - supported values: `amd64`, `i386`, `arm32v6`, `arm32v7`, `arm64v8`, `ppc64le`\n- *distName*\n  - default value: debian-like distribution\n  - supported values: the default value or `alpine`\n- *dockerImage*\n  - default value: resolved based on the platform\n  - supported values: any supported docker image\n- *qemuPath*\n  - default value: executables are resolved from `/usr/bin` directory or downloaded from https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0\n  - supported values: a path to a directory containing qemu executables\n\n## License\nThe project is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0.html).\n","funding_links":[],"categories":["Shell","测试"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonkyio%2Fembedded-postgres-binaries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzonkyio%2Fembedded-postgres-binaries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonkyio%2Fembedded-postgres-binaries/lists"}