commit 5ee9c13400ef6202e7439ec35b3f7e109af73d8f parent 1ff7c67955cd318ae9556beddfc665e216e9cb5d Author: Andreas Gruhler <andreas.gruhler@adfinis.com> Date: Sat, 21 Sep 2024 07:59:46 +0200 doc: nix-shell dev env Diffstat:
M | dev/README.md | | | 19 | +++++++++++++------ |
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/dev/README.md b/dev/README.md @@ -1,16 +1,23 @@ # Development setup -This docker-compose environment configures a PostgreSQL database with Adminer -interface for development purposes: +## Nix development environment +You can create a nix-shell for development purposes: +``` +nix-shell nix/shell.nix +``` + +## Docker environment +The docker-compose environment in this folder configures a PostgreSQL database +with Adminer interface: * https://hub.docker.com/_/postgres +* https://github.com/docker-library/docs/blob/master/postgres/README.md The Adminer can be accessed at http://127.0.0.1:8080 with the default username/password `postgres`/`example`. -To initialize the database tables, source the sql files from `../schema`. - -This can be done in Adminer or with `psql`: +The database is automatically initialized at start. To re-initialize the +database tables manually, source the sql files from `../schema`: ``` -# use `example` default password to apply +# use "example" default password to apply cat ../schema/*.sql | psql -h 127.0.0.1 -U postgres -p 5432 ```