update doc and add NEODB_SEARCH_PEERS config

This commit is contained in:
Your Name 2024-07-05 21:19:33 -04:00 committed by Henri Dickson
parent 196ac2a616
commit e29dc521e2
7 changed files with 20 additions and 7 deletions

View file

@ -51,16 +51,18 @@ Follow us on [Fediverse](https://mastodon.social/@neodb) or join our [Discord co
+ view home feed with friends' activities
* every activity can be set as viewable to self/follower-only/public
* eligible items, e.g. podcasts and albums, are playable in feed
+ login with other Fediverse server account and import social graph
+ login with other Fediverse identity and import social graph
* supported servers: Mastodon/Pleroma/Firefish/GoToSocial/Pixelfed/friendica/Takahē
+ share collections and reviews to Fediverse ~~and Twitter~~ feed
+ login with Bluesky / ATProto identity and import social graph
+ login with threads.net (requires app verification by Meta)
+ share collections and reviews to Fediverse/Bluesky/Threads
- ActivityPub support
+ NeoDB users can follow and interact with users on other ActivityPub services like Mastodon and Pleroma
+ NeoDB instances communicate with each other via an extended version of ActivityPub
+ NeoDB instances may share public rating and reviews with a default relay
+ implementation is based on [Takahē](https://jointakahe.org/) server
- Other
+ i18n/language support is being worked on
+ i18n: English, and Simp/Trad Chinese translation
## Host your own instance
Please see [docs/install.md](docs/install.md)

View file

@ -85,6 +85,8 @@ env = environ.FileAwareEnv(
NEODB_MIN_MARKS_FOR_DISCOVER=(int, 1),
# Disable cron jobs, * for all
NEODB_DISABLE_CRON_JOBS=(list, []),
# federated search peers
NEODB_SEARCH_PEERS=(list, []),
# INTEGRATED TAKAHE CONFIGURATION
TAKAHE_DB_URL=(str, "postgres://takahe:takahepass@127.0.0.1:5432/takahe"),
# Spotify - https://developer.spotify.com/
@ -268,6 +270,8 @@ DOWNLOADER_CACHE_TIMEOUT = env("NEODB_DOWNLOADER_CACHE_TIMEOUT")
DOWNLOADER_RETRIES = env("NEODB_DOWNLOADER_RETRIES")
DISABLE_CRON_JOBS = env("NEODB_DISABLE_CRON_JOBS")
SEARCH_PEERS = env("NEODB_SEARCH_PEERS")
FANOUT_LIMIT_DAYS = env("NEODB_FANOUT_LIMIT_DAYS")
# ====== USER CONFIGUTRATION END ======

View file

@ -32,6 +32,7 @@ x-shared:
NEODB_MASTODON_CLIENT_SCOPE:
NEODB_DISABLE_DEFAULT_RELAY:
NEODB_DISABLE_CRON_JOBS:
NEODB_SEARCH_PEERS:
NEODB_MIN_MARKS_FOR_DISCOVER:
NEODB_SENTRY_DSN:
TAKAHE_SENTRY_DSN:

View file

@ -40,7 +40,9 @@ if you are doing debug or development:
## Settings for Federation
- `DISABLE_DEFAULT_RELAY` is set to `False` by default, the server will send and receive public posts from `relay.neodb.net`.
- `NEODB_SEARCH_PEERS` is empty by default, which means NeoDB will search all known peers running production version of NeoDB when user look for items. This can be set to a comma-separated list of host names, so that NeoDB will only search those servers; or search no other peers if set to just `-`.
- `NEODB_DISABLE_DEFAULT_RELAY` is set to `False` by default, the server will send and receive public posts from `relay.neodb.net`.
`relay.neodb.net` is [open sourced](https://github.com/neodb-social/neodb-relay) and operated by NeoDB developers, it works like most ActivityPub relays except it only relays between NeoDB instances, it helps public information like catalogs and trends flow between NeoDB instances. You may set it to `True` if you don't want to relay public posts with other NeoDB instances.

View file

@ -42,9 +42,11 @@ NeoDB has [various features](features.md), and you may image it as a mix of Mast
- view home feed with friends' activities
- every activity can be set as viewable to self/follower-only/public
- eligible items, e.g. podcasts and albums, are playable in feed
- login with other Fediverse server account and import social graph
- login with other Fediverse identity and import social graph
- supported servers: Mastodon/Pleroma/Firefish/GoToSocial/Pixelfed/friendica/Takahē
- share collections and reviews to Fediverse ~~and Twitter~~ feed
- login with Bluesky / ATProto identity and import social graph
- login with threads.net (requires app verification by Meta)
- share collections and reviews to Fediverse/Bluesky/Threads
- ActivityPub support
- NeoDB users can follow and interact with users on other ActivityPub services like Mastodon and Pleroma
- NeoDB instances communicate with each other via an extended version of ActivityPub

View file

@ -159,7 +159,7 @@ class BlueskyAccount(SocialAccount):
return False
if self.handle != profile.handle:
logger.warning(
"ATProto refresh: handle mismatch {self.handle} from did doc -> {profile.handle} from PDS"
f"ATProto refresh: handle mismatch {self.handle} from did doc -> {profile.handle} from PDS"
)
self.account_data = {
k: v for k, v in profile.__dict__.items() if isinstance(v, (int, str))

View file

@ -763,6 +763,8 @@ class Takahe:
@staticmethod
def get_neodb_peers():
if settings.SEARCH_PEERS: # '-' = disable federated search
return [] if settings.SEARCH_PEERS == ["-"] else settings.SEARCH_PEERS
cache_key = "neodb_peers"
peers = cache.get(cache_key, None)
if peers is None: