src.nth.io/

summaryrefslogtreecommitdiff
path: root/nostr/relayer/templates
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2023-07-22 15:50:36 -0500
committerLuke Hoersten <[email protected]>2023-07-22 15:50:36 -0500
commit58d6bb46618d2cfef3a2f381e46b5eba193d7270 (patch)
tree5c1cd5ac5f604508fb27808eff3b4154c9692de1 /nostr/relayer/templates
parentd6454704216bfa4b4f6e8a250f057f2b0d543fa1 (diff)
Split out nostr install and build roles.
Diffstat (limited to 'nostr/relayer/templates')
-rw-r--r--nostr/relayer/templates/relayer.env.j24
-rw-r--r--nostr/relayer/templates/setup_db.psql.j22
2 files changed, 6 insertions, 0 deletions
diff --git a/nostr/relayer/templates/relayer.env.j2 b/nostr/relayer/templates/relayer.env.j2
new file mode 100644
index 0000000..9acacca
--- /dev/null
+++ b/nostr/relayer/templates/relayer.env.j2
@@ -0,0 +1,4 @@
+POSTGRESQL_DATABASE=postgres://{{relayer_db_user}}:{{relayer_db_pass}}@localhost:5432/{{relayer_db}}
+WHITELIST={{relayer_pubkey}}
+HOST=127.0.0.1
+PORT={{relayer_port}}
diff --git a/nostr/relayer/templates/setup_db.psql.j2 b/nostr/relayer/templates/setup_db.psql.j2
new file mode 100644
index 0000000..5284529
--- /dev/null
+++ b/nostr/relayer/templates/setup_db.psql.j2
@@ -0,0 +1,2 @@
+CREATE USER {{relayer_db_user}} WITH ENCRYPTED PASSWORD '{{relayer_db_pass}}';
+CREATE DATABASE {{relayer_db}} WITH OWNER {{relayer_db_user}};