Add instructions for unning db-init.sh to contributing_local_development.md

This commit is contained in:
Richie Zhang 2020-02-06 12:25:13 -08:00 committed by GitHub
parent a8ef9f8726
commit 7612a54894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,9 +7,18 @@
#### Set up Postgres DB #### Set up Postgres DB
```bash ```bash
psql -c "create user lemmy with password 'password' superuser;" -U postgres # Start at the root of the Lemmy repository
psql -c 'create database lemmy with owner lemmy;' -U postgres
export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy cd server
./db-init.sh
```
Or run the commands manually:
```bash
psql -c "create user lemmy with password 'password' superuser;" -U postgres
psql -c 'create database lemmy with owner lemmy;' -U postgres
export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
``` ```
#### Running #### Running