mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-08 04:02:39 +00:00
feat: add postgres to justfile for nix
This commit is contained in:
parent
90a9b65658
commit
3a60d80ea8
12
flake.nix
12
flake.nix
|
@ -122,6 +122,18 @@
|
|||
export PATH="$MIX_PATH/bin:$HEX_HOME/bin:$PATH"
|
||||
mix local.rebar --if-missing rebar3 ${rebar3}/bin/rebar3;
|
||||
mix local.rebar --if-missing rebar ${rebar}/bin/rebar;
|
||||
|
||||
export PGDATA=$PWD/db
|
||||
export PGHOST=$PGDATA
|
||||
export PGUSERNAME=$POSTGRES_USER
|
||||
export PGPASS=$POSTGRES_PASSWORD
|
||||
export PGDATABASE=$POSTGRES_DB
|
||||
if [[ ! -d $PGDATA ]]; then
|
||||
mkdir $PGDATA
|
||||
# comment out if not using CoW fs
|
||||
chattr +C $PGDATA
|
||||
initdb -D $PGDATA
|
||||
fi
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
|
|
Loading…
Reference in a new issue