docs: small wording, config example

This commit is contained in:
əlemi 2025-01-23 04:04:35 +01:00
parent e737f2b7c6
commit cf9d36ac78
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -54,12 +54,12 @@ most activitypub implementations don't really validate fetches: knowing an activ
* remote servers will be given access to all posts from any of their users once they have authenticated themselves (with http signing) * remote servers will be given access to all posts from any of their users once they have authenticated themselves (with http signing)
> [!TIP] > [!TIP]
> note that followers get expanded: addressing to `example.net/actor/followers` will address to anyone following actor that the server knows of, **at that time** > note that followers get expanded at insertion time: addressing to `example.net/actor/followers` will address to anyone following actor that the server knows of, **at that time**
## caching ## caching
μpub **doesn't download remote media** to both minimize local resources requirement and avoid storing media that remotes want gone. to prevent leaking local user ip addresses, all media links are cloaked and proxied. μpub **doesn't download remote media** to both minimize local resources requirement and avoid storing media that remotes want gone. to prevent leaking local user ip addresses, all media links are cloaked and proxied.
while this just works for small instances, larger servers should set up aggressive caching on `/proxy/...` path: more info [in coming sections](#media-proxy-cache) while this just works for small instances, larger servers should set up aggressive caching on `/proxy/...` path: more info [in following sections](#media-proxy-cache)
# deploy # deploy
μpub is built with the needs of small deployments in mind: getting a dev instance up is as easy as running one command, and setting up for production just requires some config tweaking μpub is built with the needs of small deployments in mind: getting a dev instance up is as easy as running one command, and setting up for production just requires some config tweaking
@ -110,14 +110,7 @@ bring up a complete instance with `monolith` mode: `$ upub monolith`: it will:
most maintenance tasks can be done with `$ upub cli`: register a test user with `$ upub cli register user password` most maintenance tasks can be done with `$ upub cli`: register a test user with `$ upub cli register user password`
--- done! try connecting to http://127.0.0.1:3000/web
a proper deployment will require:
* a migrated database (run `$ upub migrate --db <your-db-connection-string>` once)
* core activitypub routes (feature flag `routes`, cli `$ upub serve`)
* a job worker (feature flag `worker`, cli `$ upub work`)
running `$ upub` monolith will do all of these
## configure ## configure
all configuration lives under a `.toml` file. there is no default config path: point to it explicitly with `-c` flag while starting `upub` all configuration lives under a `.toml` file. there is no default config path: point to it explicitly with `-c` flag while starting `upub`
@ -125,6 +118,20 @@ all configuration lives under a `.toml` file. there is no default config path: p
> [!TIP] > [!TIP]
> to view μpub full default config, use `$ upub config` > to view μpub full default config, use `$ upub config`
a super minimal config may look like this
```toml
[instance]
name = "my-upub-instance"
domain = "https://my.domain.social"
[datasource]
connection_string = "postgres://localhost/upub"
[security]
allow_registration = true
```
### moderation ### moderation
> [!CAUTION] > [!CAUTION]
> currently there aren't many moderation tools and tasks will require querying db directly > currently there aren't many moderation tools and tasks will require querying db directly
@ -191,6 +198,8 @@ multiple specific binaries can be compiled with various feature flags:
- `activitypub` with core AP routes - `activitypub` with core AP routes
- `web` serving static frontend - `web` serving static frontend
remember to prepare config file and run migrations!
# development # development
development is still active, so expect more stuff to come! since most fediverse software uses Mastodon's API, μpub plans to implement it as an optional feature, becoming eventually compatible with most existing frontends and mobile applications, but focus right now is on producing something specific to μpub needs development is still active, so expect more stuff to come! since most fediverse software uses Mastodon's API, μpub plans to implement it as an optional feature, becoming eventually compatible with most existing frontends and mobile applications, but focus right now is on producing something specific to μpub needs