diff --git a/justfile b/justfile index 5e9219294f..c1c0c31a5d 100644 --- a/justfile +++ b/justfile @@ -559,7 +559,11 @@ db-pre-migrations: secrets: @cd lib/mix/tasks/secrets/ && mix escript.build && ./secrets 128 3 -# start or stop nix postgres server -nix-pg pg_cmd: - @pg_ctl -D ${PGDATA} -l ${PGDATA}/all.log -o "--unix_socket_directories='${PGDATA}'" $pg_cmd +# Start or stop nix postgres server +@nix-pg pg_cmd: + pg_ctl -D ${PGDATA} -l ${PGDATA}/all.log -o "--unix_socket_directories='${PGDATA}'" $pg_cmd +# Initialize postgres database. Only need to run the first time! +nix-pg-init: (nix-pg "start") + createdb ${PGDATABASE} + createuser -dlsw ${PGUSERNAME} diff --git a/props.nix b/props.nix index f86b892340..34898fa56e 100644 --- a/props.nix +++ b/props.nix @@ -9,7 +9,7 @@ erlang_release = "24"; # remove dotenv variables POSTGRES_* to use these! - PGUSERNAME = "postgres"; + PGUSERNAME = "bonfire"; PGDATABASE = "bonfire_db"; PGPASS = "password"; }