planetary-social / ansible-scripts

Ansible automation scripts used at Planetary
MIT License
2 stars 3 forks source link

create ansible roles for nostr relay #29

Closed cooldracula closed 1 year ago

cooldracula commented 1 year ago

This is an experiment in creating a nostr relay following the guide on jascha's blog.

I adjusted the code from this blog in a couple ways:

This PR comes with the nostr-relay and nostr-relay-nginx roles and an example inventory and playbook.

I have tested it with the site cooltesting.space. It is up and working as a relay, and I was able to write from coracle.social and see the events appear in the cooltesting.space db

[
    {"content":"relay is working","created_at":1680850919,"id":"bd7d94994cca18f7784cf406bc2a05db210448e733c1c4a21d3d2fd3a1b3b38c","kind":1,"pubkey":"35ddcde92bd63056707ca9a09a4d8cf8c2b993dc905b3407901ad17aba2336e3","sig":"b1747baf4c8ce034c5c7b8eda47b85e8e405a4ba1016e8a50a0f2880b70a5b587143fd045274dcf629dc6a523913ddedee1d8bfd2feaa3d50aaeb30b6f876a22","tags":[]},
    {"content":"docker container is working and whitelisting!","created_at":1680850984,"id":"da221fbc30b43a32c05ceb69e7fdb063f4440a60fbc915376a20d9b5d656f53b","kind":1,"pubkey":"35ddcde92bd63056707ca9a09a4d8cf8c2b993dc905b3407901ad17aba2336e3","sig":"e9f16cd1a0dff8029c3b5d4683649730dd0ea94e405993686b700dd3c3508bc8efd1ac469803240636b3fa51234fa4bd27666b9853750463eb799d06ee0a2e6a","tags":[]},
    {"content":"","created_at":1680851492,"id":"db69df5734c30c23167b1c43aa8c17d26edf5cb7354794dc72c569fd64f751fa","kind":10002,"pubkey":"35ddcde92bd63056707ca9a09a4d8cf8c2b993dc905b3407901ad17aba2336e3","sig":"5b07ff0d1aca4fac1977d76836dfa854e1cd3b5e85327b7edad458708089e0c4083c55ea1118cf7ae97d18cb2814a068521071cee98f1269c9ff06362b21832c","tags":[["r","wss://brb.io","read"],["r","wss://nostr.zebedee.cloud","read"],["r","wss://nostr-pub.wellorder.net","read"],["r","wss://relay.nostr.band","read"],["r","wss://cooltesting.space"],["client","coracle"]]},
    {"content":"i am testing from coracle","created_at":1680851515,"id":"8b83b67b32ae1880ccba69ae08a9c2778569cd47cfd48051dd349d61f44656c4","kind":1,"pubkey":"35ddcde92bd63056707ca9a09a4d8cf8c2b993dc905b3407901ad17aba2336e3","sig":"61f0c9c6800933c5b4b1851a6b39d92b53cbb79e78b947663d39f06f38d3a46596a827cf0d1020294b4d5111b96f0de30795a26cba752ccd4b13ff231340ca1d","tags":[["client","coracle"]]}
]

pretty cool!

This pr is still a draft until it has decent:

mplorentz commented 1 year ago

v cool. I have an instance of nostr-rs-relay running in docker on my home server. I have been using this to convert npubs to hex: https://damus.io/key/