~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH sr.ht-docs 1/2] hacking: update db instructions to use schema.sql

Details
Message ID
<20221114091647.21328-1-vlad@vladh.net>
DKIM signature
pass
Download raw message
Patch: +7 -6
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
 configuration.md | 11 ++++++-----
 hacking.md       |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/configuration.md b/configuration.md
index 0f6190d..c6e680e 100644
--- a/configuration.md
+++ b/configuration.md
@@ -126,11 +126,12 @@ its own database login, with full permissions for its database so that it may
manage its own schema migrations.

Once you populate the `connection-string` field in your `config.ini`, you may
use the `<module>-initdb` script to populate the schema and stamp the latest
revision for migrations (e.g., `metasrht-initdb` to set up meta.sr.ht's
database). Note that if you have not configured SSL for your PostgreSQL server,
you may have to append `?sslmode=disable` to your connection string for some
services to work.
use the `schema.sql` file to populate the database (e.g.
`psql -d meta.sr.ht -f schema.sql` to set up meta.sr.ht's database).

Note that if you have not configured SSL for your PostgreSQL server, you may
have to append `?sslmode=disable` to your connection string for some services
to work.

## Schema Upgrades

diff --git a/hacking.md b/hacking.md
index b1e46f1..f7010c2 100644
--- a/hacking.md
+++ b/hacking.md
@@ -71,7 +71,7 @@ For each service *except* meta.sr.ht:
For each `SERVICE`:

* `createdb $SERVICE`
* `./$SRV-initdb` (e.g. `./metasrht-initdb`)
* `psql -d $SERVICE -f schema.sql` (e.g. `psql -d meta.sr.ht -f schema.sql`)

To run a service:

-- 
2.38.1

[PATCH sr.ht-docs 2/2] hacking: add examples for clarity

Details
Message ID
<20221114091647.21328-2-vlad@vladh.net>
In-Reply-To
<20221114091647.21328-1-vlad@vladh.net> (view parent)
DKIM signature
pass
Download raw message
Patch: +2 -2
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
 hacking.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hacking.md b/hacking.md
index f7010c2..7c7dea9 100644
--- a/hacking.md
+++ b/hacking.md
@@ -51,7 +51,7 @@ When filling in the `config.ini` file, remember the following:
* If you do not have SSL enabled for Postgres, be sure to add `?sslmode=disable`
  to the end of your Postgres URL.

Then, for each `SERVICE`:
Then, for each `SERVICE` (e.g. `meta.sr.ht`):

* `export SRHT_PATH=/path/to/core.sr.ht/srht`
* `export PYTHONPATH=/path/to/core.sr.ht:/path/to/$SERVICE`
@@ -70,7 +70,7 @@ For each service *except* meta.sr.ht:

For each `SERVICE`:

* `createdb $SERVICE`
* `createdb $SERVICE` (e.g. `createdb meta.sr.ht`)
* `psql -d $SERVICE -f schema.sql` (e.g. `psql -d meta.sr.ht -f schema.sql`)

To run a service:
-- 
2.38.1

Re: [PATCH sr.ht-docs 2/2] hacking: add examples for clarity

Details
Message ID
<COI3YOW4IQ7A.E5RIBBB12RGY@megumin>
In-Reply-To
<20221114091647.21328-2-vlad@vladh.net> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/sr.ht-docs
   43fe9c3..5e3b25c  master -> master
Reply to thread Export thread (mbox)