Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose postgres with extension #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justinrubek
Copy link
Owner

This uses services-flake to run postgres locally, but also exposes the postgresql flake package when can be used to run postgres. To run it locally, use nix run .#services. This command will expect environment variables set: PRJ_DATA_HOME and PG1_PORT. For convenience, direnv will look in the .direnv/env directory for files that define environment variables (the file name is the variable name and file contents are its value).

This postgres has been verified to work with the extension:

➜ psql -h 127.0.0.1 -d array-example -p 5435
psql (15.6)
Type "help" for help.

array-example=# CREATE EXTENSION arrays;
WARNING:  creating sample data in the table 'vectors.data'.
CREATE EXTENSION
array-example=#

This uses services-flake to run postgres locally, but also exposes the
`postgresql` flake package when can be used to run postgres. To run it
locally, use `nix run .#services`. This command will expect environment
variables set: `PRJ_DATA_HOME` and `PG1_PORT`. For convenience, direnv
will look in the `.direnv/env` directory for files that define
environment variables (the file name is the variable name and file
contents are its value).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant