Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/app/docs/devbox_examples/databases/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 8 additions & 4 deletions examples/databases/postgres/devbox.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"packages": [
"postgresql@latest"
],
"packages": {
"postgresql": "latest",
"glibcLocales": {
"version": "latest",
"platforms": ["x86_64-linux", "aarch64-linux"]
}
},
"shell": {
"init_hook": null
}
}
}
17 changes: 16 additions & 1 deletion examples/databases/postgres/devbox.lock
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}