diff --git a/docs/app/docs/devbox_examples/databases/postgres.md b/docs/app/docs/devbox_examples/databases/postgres.md index 0e076bb7803..31e29192487 100644 --- a/docs/app/docs/devbox_examples/databases/postgres.md +++ b/docs/app/docs/devbox_examples/databases/postgres.md @@ -9,13 +9,18 @@ PostgreSQL can be automatically configured by Devbox via the built-in Postgres P ## Adding Postgres to your Shell -`devbox add postgresql glibcLocales`, or in your `devbox.json`, add +You can install the PostgreSQL server and client by running`devbox add postgresql`. In some Linux distributions, you may also need to add `glibcLocales`, which can be added using `devbox add glibcLocales --platform=x86_64-linux,aarch64-linux`. + +Alternatively, you can add the following to your devbox.json: ```json - "packages": [ - "postgresql@latest", - "glibcLocales@latest" - ] + "packages": { + "postgresql": "latest", + "glibcLocales": { + "version": "latest", + "platforms": ["x86_64-linux", "aarch64-linux"] + } + } ``` This will install the latest version of Postgres. You can find other installable versions of Postgres by running `devbox search postgresql`. You can also view the available versions on [Nixhub](https://www.nixhub.io/packages/postgresql) diff --git a/examples/databases/postgres/devbox.json b/examples/databases/postgres/devbox.json index 6d56c845a3f..e528a436349 100644 --- a/examples/databases/postgres/devbox.json +++ b/examples/databases/postgres/devbox.json @@ -1,8 +1,12 @@ { - "packages": [ - "postgresql@latest" - ], + "packages": { + "postgresql": "latest", + "glibcLocales": { + "version": "latest", + "platforms": ["x86_64-linux", "aarch64-linux"] + } + }, "shell": { "init_hook": null } -} \ No newline at end of file +} diff --git a/examples/databases/postgres/devbox.lock b/examples/databases/postgres/devbox.lock index f44c29f2510..be3518ee4d0 100644 --- a/examples/databases/postgres/devbox.lock +++ b/examples/databases/postgres/devbox.lock @@ -1,10 +1,25 @@ { "lockfile_version": "1", "packages": { + "glibcLocales@latest": { + "last_modified": "2024-01-14T03:55:27Z", + "resolved": "github:NixOS/nixpkgs/dd5621df6dcb90122b50da5ec31c411a0de3e538#glibcLocales", + "source": "devbox-search", + "version": "2.38-27", + "systems": { + "aarch64-linux": { + "store_path": "/nix/store/i0aff1lm1js9j9ggw7js7n5869bfxm6z-glibc-locales-2.38-27" + }, + "x86_64-linux": { + "store_path": "/nix/store/wyl74hap7bh513hp3rz1j608gs7267af-glibc-locales-2.38-27" + } + } + }, "postgresql@latest": { "last_modified": "2023-05-01T16:53:22Z", + "plugin_version": "0.0.2", "resolved": "github:NixOS/nixpkgs/8670e496ffd093b60e74e7fa53526aa5920d09eb#postgresql", "version": "14.7" } } -} \ No newline at end of file +}