mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
9dc4de3cf2
* federation: parallel sending * federation: some comments * lint and set force_write true when a request fails * inbox_urls return vec * split inbox functions into separate file * cleanup * extract sending task code to separate file * move federation concurrent config to config file * off by one issue * improve msg * fix both permanent stopping of federation queues and multiple creation of the same federation queues * fix after merge * lint fix * Update crates/federate/src/send.rs Co-authored-by: dullbananas <dull.bananas0@gmail.com> * comment about reverse ordering * remove crashable, comment * comment * move comment * run federation tests twice * fix test run * prettier * fix config default * upgrade rust to 1.78 to fix diesel cli * fix clippy * delay * add debug to make localhost urls not valid in ap crate, add some debug logs * federation tests: ensure server stop after test and random activity id * ci fix * add test to federate 100 events * fix send 100 test * different data every time so activities are distinguishable * allow out of order receives in test * lint * comment about https://github.com/LemmyNet/lemmy/pull/4623#discussion_r1565437391 * move sender for clarity, add comment * move more things to members * update test todo comment, use same env var as worker test but default to 1 * remove else below continue * some more cleanup * handle todo about smooth exit * add federate inboxes collector tests * lint * actor max length * don't reset fail count if activity skipped * fix some comments * reuse vars * format * Update .woodpecker.yml * fix recheck time * fix inboxes tests under fast mode * format * make i32 and ugly casts * clippy --------- Co-authored-by: dullbananas <dull.bananas0@gmail.com>
124 lines
4.8 KiB
Text
124 lines
4.8 KiB
Text
{
|
|
# settings related to the postgresql database
|
|
database: {
|
|
# Configure the database by specifying a URI
|
|
#
|
|
# This is the preferred method to specify database connection details since
|
|
# it is the most flexible.
|
|
# Connection URI pointing to a postgres instance
|
|
#
|
|
# This example uses peer authentication to obviate the need for creating,
|
|
# configuring, and managing passwords.
|
|
#
|
|
# For an explanation of how to use connection URIs, see [here][0] in
|
|
# PostgreSQL's documentation.
|
|
#
|
|
# [0]: https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
|
|
uri: "postgresql:///lemmy?user=lemmy&host=/var/run/postgresql"
|
|
|
|
# or
|
|
|
|
# Configure the database by specifying parts of a URI
|
|
#
|
|
# Note that specifying the `uri` field should be preferred since it provides
|
|
# greater control over how the connection is made. This merely exists for
|
|
# backwards-compatibility.
|
|
# Username to connect to postgres
|
|
user: "string"
|
|
# Password to connect to postgres
|
|
password: "string"
|
|
# Host where postgres is running
|
|
host: "string"
|
|
# Port where postgres can be accessed
|
|
port: 123
|
|
# Name of the postgres database for lemmy
|
|
database: "string"
|
|
# Maximum number of active sql connections
|
|
pool_size: 30
|
|
}
|
|
# Pictrs image server configuration.
|
|
pictrs: {
|
|
# Address where pictrs is available (for image hosting)
|
|
url: "http://localhost:8080/"
|
|
# Set a custom pictrs API key. ( Required for deleting images )
|
|
api_key: "string"
|
|
# Backwards compatibility with 0.18.1. False is equivalent to `image_mode: None`, true is
|
|
# equivalent to `image_mode: StoreLinkPreviews`.
|
|
#
|
|
# To be removed in 0.20
|
|
cache_external_link_previews: true
|
|
# Specifies how to handle remote images, so that users don't have to connect directly to remote
|
|
# servers.
|
|
image_mode:
|
|
# Leave images unchanged, don't generate any local thumbnails for post urls. Instead the
|
|
# Opengraph image is directly returned as thumbnail
|
|
"None"
|
|
|
|
# or
|
|
|
|
# Generate thumbnails for external post urls and store them persistently in pict-rs. This
|
|
# ensures that they can be reliably retrieved and can be resized using pict-rs APIs. However
|
|
# it also increases storage usage.
|
|
#
|
|
# This is the default behaviour, and also matches Lemmy 0.18.
|
|
"StoreLinkPreviews"
|
|
|
|
# or
|
|
|
|
# If enabled, all images from remote domains are rewritten to pass through
|
|
# `/api/v3/image_proxy`, including embedded images in markdown. Images are stored temporarily
|
|
# in pict-rs for caching. This improves privacy as users don't expose their IP to untrusted
|
|
# servers, and decreases load on other servers. However it increases bandwidth use for the
|
|
# local server.
|
|
#
|
|
# Requires pict-rs 0.5
|
|
"ProxyAllImages"
|
|
# Timeout for uploading images to pictrs (in seconds)
|
|
upload_timeout: 30
|
|
}
|
|
# Email sending configuration. All options except login/password are mandatory
|
|
email: {
|
|
# Hostname and port of the smtp server
|
|
smtp_server: "localhost:25"
|
|
# Login name for smtp server
|
|
smtp_login: "string"
|
|
# Password to login to the smtp server
|
|
smtp_password: "string"
|
|
# Address to send emails from, eg "noreply@your-instance.com"
|
|
smtp_from_address: "noreply@example.com"
|
|
# Whether or not smtp connections should use tls. Can be none, tls, or starttls
|
|
tls_type: "none"
|
|
}
|
|
# Parameters for automatic configuration of new instance (only used at first start)
|
|
setup: {
|
|
# Username for the admin user
|
|
admin_username: "admin"
|
|
# Password for the admin user. It must be between 10 and 60 characters.
|
|
admin_password: "tf6HHDS4RolWfFhk4Rq9"
|
|
# Name of the site, can be changed later. Maximum 20 characters.
|
|
site_name: "My Lemmy Instance"
|
|
# Email for the admin user (optional, can be omitted and set later through the website)
|
|
admin_email: "user@example.com"
|
|
}
|
|
# the domain name of your instance (mandatory)
|
|
hostname: "unset"
|
|
# Address where lemmy should listen for incoming requests
|
|
bind: "0.0.0.0"
|
|
# Port where lemmy should listen for incoming requests
|
|
port: 8536
|
|
# Whether the site is available over TLS. Needs to be true for federation to work.
|
|
tls_enabled: true
|
|
federation: {
|
|
# Limit to the number of concurrent outgoing federation requests per target instance.
|
|
# Set this to a higher value than 1 (e.g. 6) only if you have a huge instance (>10 activities
|
|
# per second) and if a receiving instance is not keeping up.
|
|
concurrent_sends_per_instance: 1
|
|
}
|
|
prometheus: {
|
|
bind: "127.0.0.1"
|
|
port: 10002
|
|
}
|
|
# Sets a response Access-Control-Allow-Origin CORS header
|
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
|
|
cors_origin: "*"
|
|
}
|