From 12c7633380736c7bb65ec71a30df932f34279f25 Mon Sep 17 00:00:00 2001 From: Richie Zhang <12566991+StaticallyTypedRice@users.noreply.github.com> Date: Thu, 6 Feb 2020 12:25:13 -0800 Subject: Add instructions for unning db-init.sh to contributing_local_development.md --- docs/src/contributing_local_development.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/src/contributing_local_development.md b/docs/src/contributing_local_development.md index c19bcba8..7d782925 100644 --- a/docs/src/contributing_local_development.md +++ b/docs/src/contributing_local_development.md @@ -7,9 +7,18 @@ #### Set up Postgres DB ```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 +# Start at the root of the Lemmy repository + +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 -- cgit v1.2.3 From 9b6f8ec20749b15b90aa375311ad1c5d74f1bd2d Mon Sep 17 00:00:00 2001 From: Richie Zhang <12566991+StaticallyTypedRice@users.noreply.github.com> Date: Thu, 6 Feb 2020 12:26:01 -0800 Subject: Add instructions for unning db-init.sh to administration_configuration.md --- docs/src/administration_configuration.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/src/administration_configuration.md b/docs/src/administration_configuration.md index 73ea3504..c47d3236 100644 --- a/docs/src/administration_configuration.md +++ b/docs/src/administration_configuration.md @@ -4,3 +4,12 @@ Additionally, you can override any config files with environment variables. Thes `LEMMY__DATABASE__POOL_SIZE=10`. An additional option `LEMMY_DATABASE_URL` is available, which can be used with a PostgreSQL connection string like `postgres://lemmy:password@lemmy_db:5432/lemmy`, passing all connection details at once. + +If the Docker container is not used, manually create the database specified above by running the following commands: + +```bash +# Start at the root of the Lemmy repository + +cd server +./db-init.sh +``` -- cgit v1.2.3