Prefer $PWD/data over $PGDATA.
Include additional `.gitignore` rules to phoenix spec.pull/10/head
parent
2cecfa42d1
commit
ac84906dad
|
@ -75,6 +75,12 @@ nix develop "$BUILD" --command bash -c "pg_ctl initdb -D $BUILD/data"
|
|||
cat <<EOF >> "$BUILD"/.gitignore
|
||||
# The default location of the generated database cluster.
|
||||
/data/
|
||||
|
||||
# Directory used by \`direnv\` to hold \`use flake\`-generated profiles.
|
||||
/.direnv/
|
||||
|
||||
# A symlink produced by default when running \`nix build\`.
|
||||
/result
|
||||
EOF
|
||||
|
||||
# ============================================================
|
||||
|
|
|
@ -13,7 +13,7 @@ $> nix develop
|
|||
An empty Postgres cluster is initialized at `/data`. To start the database, run
|
||||
the following:
|
||||
```bash
|
||||
$> pg_ctl start -o --unix_socket_directories="$PGDATA"
|
||||
$> pg_ctl start -o --unix_socket_directories="$PWD/data"
|
||||
```
|
||||
To shut the database down, run:
|
||||
```bash
|
||||
|
@ -21,7 +21,7 @@ $> pg_ctl stop
|
|||
```
|
||||
You can connect to this database from the project root directory by running:
|
||||
```bash
|
||||
$> psql -h "$PWD"/data -d postgres
|
||||
$> psql -h "$PWD/data" -d postgres
|
||||
```
|
||||
|
||||
Afterward, you can run the Phoenix setup commands:
|
||||
|
|
|
@ -13,7 +13,7 @@ $> nix develop
|
|||
An empty Postgres cluster is initialized at `/data`. To start the database, run
|
||||
the following:
|
||||
```bash
|
||||
$> pg_ctl start -o --unix_socket_directories="$PGDATA"
|
||||
$> pg_ctl start -o --unix_socket_directories="$PWD/data"
|
||||
```
|
||||
To shut the database down, run:
|
||||
```bash
|
||||
|
@ -21,5 +21,5 @@ $> pg_ctl stop
|
|||
```
|
||||
You can connect to this database from the project root directory by running:
|
||||
```bash
|
||||
$> psql -h "$PWD"/data -d postgres
|
||||
$> psql -h "$PWD/data" -d postgres
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue