parent
1ef252e29d
commit
909d16c2f0
|
@ -3298,12 +3298,12 @@ Email sending is disabled by default, as it requires additional configuration.
|
||||||
In this mode, emails are simply outputed on stdout.
|
In this mode, emails are simply outputed on stdout.
|
||||||
|
|
||||||
If you want to actually send those emails to your users, you should edit your
|
If you want to actually send those emails to your users, you should edit your
|
||||||
.env file and tweak the EMAIL_CONFIG variable. See :ref:`setting-EMAIL_CONFIG`
|
.env file and tweak the ``EMAIL_CONFIG`` variable. See :data:`EMAIL_CONFIG <config.settings.common.EMAIL_CONFIG>`
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
As a result of these changes, the DJANGO_EMAIL_BACKEND variable,
|
As a result of these changes, the ``DJANGO_EMAIL_BACKEND`` variable,
|
||||||
which was not documented, has no effect anymore. You can safely remove it from
|
which was not documented, has no effect anymore. You can safely remove it from
|
||||||
your .env file if it is set.
|
your .env file if it is set.
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,8 @@ FUNKWHALE_PLUGINS_PATH = env(
|
||||||
"FUNKWHALE_PLUGINS_PATH", default="/srv/funkwhale/plugins/"
|
"FUNKWHALE_PLUGINS_PATH", default="/srv/funkwhale/plugins/"
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Path to a directory containing Funkwhale plugins. These will be imported at runtime.
|
Path to a directory containing Funkwhale plugins.
|
||||||
|
These will be imported at runtime.
|
||||||
"""
|
"""
|
||||||
sys.path.append(FUNKWHALE_PLUGINS_PATH)
|
sys.path.append(FUNKWHALE_PLUGINS_PATH)
|
||||||
CORE_PLUGINS = [
|
CORE_PLUGINS = [
|
||||||
|
@ -123,12 +124,13 @@ else:
|
||||||
try:
|
try:
|
||||||
FUNKWHALE_HOSTNAME = env("FUNKWHALE_HOSTNAME")
|
FUNKWHALE_HOSTNAME = env("FUNKWHALE_HOSTNAME")
|
||||||
"""
|
"""
|
||||||
Hostname of your Funkwhale pod, e.g ``mypod.audio``
|
Hostname of your Funkwhale pod, e.g. ``mypod.audio``
|
||||||
"""
|
"""
|
||||||
|
|
||||||
FUNKWHALE_PROTOCOL = env("FUNKWHALE_PROTOCOL", default="https")
|
FUNKWHALE_PROTOCOL = env("FUNKWHALE_PROTOCOL", default="https")
|
||||||
"""
|
"""
|
||||||
Protocol end users will use to access your pod, either ``http`` or ``https``.
|
Protocol end users will use to access your pod, either
|
||||||
|
``http`` or ``https``.
|
||||||
"""
|
"""
|
||||||
except Exception:
|
except Exception:
|
||||||
FUNKWHALE_URL = env("FUNKWHALE_URL")
|
FUNKWHALE_URL = env("FUNKWHALE_URL")
|
||||||
|
@ -143,13 +145,16 @@ FUNKWHALE_SPA_HTML_ROOT = env(
|
||||||
"FUNKWHALE_SPA_HTML_ROOT", default=FUNKWHALE_URL + "/front/"
|
"FUNKWHALE_SPA_HTML_ROOT", default=FUNKWHALE_URL + "/front/"
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
URL or path to the Web Application files. Funkwhale needs access to it so that
|
URL or path to the Web Application files.
|
||||||
it can inject <meta> tags relevant to the given page (e.g page title, cover, etc.).
|
Funkwhale needs access to it so that it can inject <meta> tags relevant
|
||||||
|
to the given page (e.g page title, cover, etc.).
|
||||||
|
|
||||||
If a URL is specified, the index.html file will be fetched through HTTP. If a path is provided,
|
If a URL is specified, the index.html file will be fetched through HTTP.
|
||||||
|
If a path is provided,
|
||||||
it will be accessed from disk.
|
it will be accessed from disk.
|
||||||
|
|
||||||
Use something like ``/srv/funkwhale/front/dist/`` if the web processes shows request errors related to this.
|
Use something like ``/srv/funkwhale/front/dist/`` if the web processes shows
|
||||||
|
request errors related to this.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
FUNKWHALE_SPA_HTML_CACHE_DURATION = env.int(
|
FUNKWHALE_SPA_HTML_CACHE_DURATION = env.int(
|
||||||
|
@ -174,7 +179,8 @@ FEDERATION_SERVICE_ACTOR_USERNAME = env(
|
||||||
# How many pages to fetch when crawling outboxes and third-party collections
|
# How many pages to fetch when crawling outboxes and third-party collections
|
||||||
FEDERATION_COLLECTION_MAX_PAGES = env.int("FEDERATION_COLLECTION_MAX_PAGES", default=5)
|
FEDERATION_COLLECTION_MAX_PAGES = env.int("FEDERATION_COLLECTION_MAX_PAGES", default=5)
|
||||||
"""
|
"""
|
||||||
Number of existing pages of content to fetch when discovering/refreshing an actor or channel.
|
Number of existing pages of content to fetch when discovering/refreshing an
|
||||||
|
actor or channel.
|
||||||
|
|
||||||
More pages means more content will be loaded, but will require more resources.
|
More pages means more content will be loaded, but will require more resources.
|
||||||
"""
|
"""
|
||||||
|
@ -283,12 +289,14 @@ MIDDLEWARE = (
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||||||
DJANGO_DEBUG = DEBUG = env.bool("DJANGO_DEBUG", False)
|
DJANGO_DEBUG = DEBUG = env.bool("DJANGO_DEBUG", False)
|
||||||
"""
|
"""
|
||||||
Whether to enable debugging info and pages. Never enable this on a production server,
|
Whether to enable debugging info and pages.
|
||||||
as it can leak very sensitive information.
|
Never enable this on a production server, as it can leak very sensitive
|
||||||
|
information.
|
||||||
"""
|
"""
|
||||||
# FIXTURE CONFIGURATION
|
# FIXTURE CONFIGURATION
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
|
||||||
FIXTURE_DIRS = (str(APPS_DIR.path("fixtures")),)
|
FIXTURE_DIRS = (str(APPS_DIR.path("fixtures")),)
|
||||||
|
|
||||||
# EMAIL CONFIGURATION
|
# EMAIL CONFIGURATION
|
||||||
|
@ -335,7 +343,8 @@ On a production instance, you'll usually want to use an external SMTP server:
|
||||||
If ``user`` or ``password`` contain special characters (eg.
|
If ``user`` or ``password`` contain special characters (eg.
|
||||||
``noreply@youremail.host`` as ``user``), be sure to urlencode them, using
|
``noreply@youremail.host`` as ``user``), be sure to urlencode them, using
|
||||||
for example the command:
|
for example the command:
|
||||||
``python3 -c 'import urllib.parse; print(urllib.parse.quote_plus("noreply@youremail.host"))'``
|
``python3 -c 'import urllib.parse; print(urllib.parse.quote_plus
|
||||||
|
("noreply@youremail.host"))'``
|
||||||
(returns ``noreply%40youremail.host``)
|
(returns ``noreply%40youremail.host``)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -399,20 +408,25 @@ USE_TZ = True
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
|
||||||
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||||
"DIRS": [str(APPS_DIR.path("templates"))],
|
"DIRS": [str(APPS_DIR.path("templates"))],
|
||||||
"OPTIONS": {
|
"OPTIONS": {
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||||
"debug": DEBUG,
|
"debug": DEBUG,
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
||||||
# https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
|
# https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
|
||||||
"loaders": [
|
"loaders": [
|
||||||
"django.template.loaders.filesystem.Loader",
|
"django.template.loaders.filesystem.Loader",
|
||||||
"django.template.loaders.app_directories.Loader",
|
"django.template.loaders.app_directories.Loader",
|
||||||
],
|
],
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
|
||||||
"context_processors": [
|
"context_processors": [
|
||||||
"django.template.context_processors.debug",
|
"django.template.context_processors.debug",
|
||||||
"django.template.context_processors.request",
|
"django.template.context_processors.request",
|
||||||
|
@ -428,7 +442,8 @@ TEMPLATES = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
# See: http://django-crispy-forms.readthedocs.org/en/latest/install.html#template-packs
|
# See:
|
||||||
|
# http://django-crispy-forms.readthedocs.org/en/latest/install.html#template-packs
|
||||||
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
||||||
|
|
||||||
# STATIC FILE CONFIGURATION
|
# STATIC FILE CONFIGURATION
|
||||||
|
@ -444,8 +459,9 @@ DEFAULT_FILE_STORAGE = "funkwhale_api.common.storage.ASCIIFileSystemStorage"
|
||||||
|
|
||||||
PROXY_MEDIA = env.bool("PROXY_MEDIA", default=True)
|
PROXY_MEDIA = env.bool("PROXY_MEDIA", default=True)
|
||||||
"""
|
"""
|
||||||
Wether to proxy audio files through your reverse proxy. It's recommended to keep this on,
|
Wether to proxy audio files through your reverse proxy.
|
||||||
as a way to enforce access control, however, if you're using S3 storage with :attr:`AWS_QUERYSTRING_AUTH`,
|
It's recommended to keep this on, as a way to enforce access control, however,
|
||||||
|
if you're using S3 storage with :attr:`AWS_QUERYSTRING_AUTH`,
|
||||||
it's safe to disable it.
|
it's safe to disable it.
|
||||||
"""
|
"""
|
||||||
AWS_DEFAULT_ACL = None
|
AWS_DEFAULT_ACL = None
|
||||||
|
@ -462,7 +478,8 @@ AWS_S3_MAX_MEMORY_SIZE = env.int(
|
||||||
|
|
||||||
AWS_QUERYSTRING_EXPIRE = env.int("AWS_QUERYSTRING_EXPIRE", default=3600)
|
AWS_QUERYSTRING_EXPIRE = env.int("AWS_QUERYSTRING_EXPIRE", default=3600)
|
||||||
"""
|
"""
|
||||||
Expiration delay, in seconds, of signatures generated when :attr:`AWS_QUERYSTRING_AUTH` is enabled.
|
Expiration delay, in seconds, of signatures generated when
|
||||||
|
:attr:`AWS_QUERYSTRING_AUTH` is enabled.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
AWS_ACCESS_KEY_ID = env("AWS_ACCESS_KEY_ID", default=None)
|
AWS_ACCESS_KEY_ID = env("AWS_ACCESS_KEY_ID", default=None)
|
||||||
|
@ -486,15 +503,17 @@ if AWS_ACCESS_KEY_ID:
|
||||||
"""
|
"""
|
||||||
AWS_S3_ENDPOINT_URL = env("AWS_S3_ENDPOINT_URL", default=None)
|
AWS_S3_ENDPOINT_URL = env("AWS_S3_ENDPOINT_URL", default=None)
|
||||||
"""
|
"""
|
||||||
If you use a S3-compatible storage such as minio, set the following variable to
|
If you use a S3-compatible storage such as minio,
|
||||||
the full URL to the storage server. Example:
|
set the following variable to the full URL to the storage server. Example:
|
||||||
|
|
||||||
- ``https://minio.mydomain.com``
|
- ``https://minio.mydomain.com``
|
||||||
- ``https://s3.wasabisys.com``
|
- ``https://s3.wasabisys.com``
|
||||||
"""
|
"""
|
||||||
AWS_S3_REGION_NAME = env("AWS_S3_REGION_NAME", default=None)
|
AWS_S3_REGION_NAME = env("AWS_S3_REGION_NAME", default=None)
|
||||||
"""If you are using Amazon S3 to serve media directly, you will need to specify your region
|
"""If you are using Amazon S3 to serve media directly,
|
||||||
name in order to access files. Example:
|
you will need to specify your region name in order to access files.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
- ``eu-west-2``
|
- ``eu-west-2``
|
||||||
"""
|
"""
|
||||||
|
@ -502,16 +521,19 @@ if AWS_ACCESS_KEY_ID:
|
||||||
AWS_S3_SIGNATURE_VERSION = "s3v4"
|
AWS_S3_SIGNATURE_VERSION = "s3v4"
|
||||||
AWS_LOCATION = env("AWS_LOCATION", default="")
|
AWS_LOCATION = env("AWS_LOCATION", default="")
|
||||||
"""
|
"""
|
||||||
An optional bucket subdirectory were you want to store the files. This is especially useful
|
An optional bucket subdirectory were you want to store the files.
|
||||||
if you plan to use share the bucket with other services
|
This is especially useful if you plan to use share the bucket with other
|
||||||
|
services.
|
||||||
"""
|
"""
|
||||||
DEFAULT_FILE_STORAGE = "funkwhale_api.common.storage.ASCIIS3Boto3Storage"
|
DEFAULT_FILE_STORAGE = "funkwhale_api.common.storage.ASCIIS3Boto3Storage"
|
||||||
|
|
||||||
|
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
||||||
STATICFILES_DIRS = (str(APPS_DIR.path("static")),)
|
STATICFILES_DIRS = (str(APPS_DIR.path("static")),)
|
||||||
|
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
# See:
|
||||||
|
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
||||||
STATICFILES_FINDERS = (
|
STATICFILES_FINDERS = (
|
||||||
"django.contrib.staticfiles.finders.FileSystemFinder",
|
"django.contrib.staticfiles.finders.FileSystemFinder",
|
||||||
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
||||||
|
@ -522,15 +544,15 @@ STATICFILES_FINDERS = (
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
|
||||||
MEDIA_ROOT = env("MEDIA_ROOT", default=str(APPS_DIR("media")))
|
MEDIA_ROOT = env("MEDIA_ROOT", default=str(APPS_DIR("media")))
|
||||||
"""
|
"""
|
||||||
Where media files (such as album covers or audio tracks) should be stored
|
Path where media files (such as album covers or audio tracks) are stored
|
||||||
on your system? (Ensure this directory actually exists)
|
on your system. Ensure this directory actually exists.
|
||||||
"""
|
"""
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
|
||||||
MEDIA_URL = env("MEDIA_URL", default=FUNKWHALE_URL + "/media/")
|
MEDIA_URL = env("MEDIA_URL", default=FUNKWHALE_URL + "/media/")
|
||||||
"""
|
"""
|
||||||
URL where media files are served. The default value should work fine on most
|
URL where media files are served. The default value should work fine on most
|
||||||
configurations, but could can tweak this if you are hosting media files on a separate
|
configurations, but could can tweak this if you are hosting media
|
||||||
domain, or if you host Funkwhale on a non-standard port.
|
files on a separate domain, or if you host Funkwhale on a non-standard port.
|
||||||
"""
|
"""
|
||||||
FILE_UPLOAD_PERMISSIONS = 0o644
|
FILE_UPLOAD_PERMISSIONS = 0o644
|
||||||
|
|
||||||
|
@ -538,7 +560,8 @@ ATTACHMENTS_UNATTACHED_PRUNE_DELAY = env.int(
|
||||||
"ATTACHMENTS_UNATTACHED_PRUNE_DELAY", default=3600 * 24
|
"ATTACHMENTS_UNATTACHED_PRUNE_DELAY", default=3600 * 24
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Delay in seconds before uploaded but unattached attachements are pruned from the system.
|
Delay in seconds before uploaded but unattached attachements are pruned
|
||||||
|
from the system.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# URL Configuration
|
# URL Configuration
|
||||||
|
@ -568,12 +591,13 @@ ACCOUNT_EMAIL_VERIFICATION_ENFORCE = env.bool(
|
||||||
"ACCOUNT_EMAIL_VERIFICATION_ENFORCE", default=False
|
"ACCOUNT_EMAIL_VERIFICATION_ENFORCE", default=False
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Determine wether users need to verify their email address before using the service. Enabling this can be useful
|
Determine wether users need to verify their email address before using
|
||||||
to reduce spam or bots accounts, however, you'll need to configure a mail server so that your users can receive the
|
the service. Enabling this can be useful to reduce spam or bots accounts,
|
||||||
verification emails, using :attr:`EMAIL_CONFIG`.
|
however, you'll need to configure a mail server so that your users can receive
|
||||||
|
the verification emails, using :attr:`EMAIL_CONFIG`.
|
||||||
Note that regardless of the setting value, superusers created through the command line will never require verification.
|
|
||||||
|
|
||||||
|
Note that regardless of the setting value, superusers created through the
|
||||||
|
command line will never require verification.
|
||||||
"""
|
"""
|
||||||
ACCOUNT_EMAIL_VERIFICATION = (
|
ACCOUNT_EMAIL_VERIFICATION = (
|
||||||
"mandatory" if ACCOUNT_EMAIL_VERIFICATION_ENFORCE else "optional"
|
"mandatory" if ACCOUNT_EMAIL_VERIFICATION_ENFORCE else "optional"
|
||||||
|
@ -609,12 +633,15 @@ SCOPED_TOKENS_MAX_AGE = 60 * 60 * 24 * 3
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
AUTH_LDAP_ENABLED = env.bool("LDAP_ENABLED", default=False)
|
AUTH_LDAP_ENABLED = env.bool("LDAP_ENABLED", default=False)
|
||||||
"""
|
"""
|
||||||
Wether to enable LDAP authentication. See :doc:`/installation/ldap` for more information.
|
Wether to enable LDAP authentication.
|
||||||
|
|
||||||
|
See :doc:`/installation/ldap` for more information.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if AUTH_LDAP_ENABLED:
|
if AUTH_LDAP_ENABLED:
|
||||||
|
|
||||||
# Import the LDAP modules here; this way, we don't need the dependency unless someone
|
# Import the LDAP modules here.
|
||||||
|
# This way, we don't need the dependency unless someone
|
||||||
# actually enables the LDAP support
|
# actually enables the LDAP support
|
||||||
import ldap
|
import ldap
|
||||||
from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion, GroupOfNamesType
|
from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion, GroupOfNamesType
|
||||||
|
@ -685,14 +712,16 @@ CACHE_URL = env.cache_url("CACHE_URL", default=CACHE_DEFAULT)
|
||||||
"""
|
"""
|
||||||
URL to your redis server. Examples:
|
URL to your redis server. Examples:
|
||||||
|
|
||||||
- `redis://<host>:<port>/<database>`
|
- ``redis://<host>:<port>/<database>``
|
||||||
- `redis://127.0.0.1:6379/0`
|
- ``redis://127.0.0.1:6379/0``
|
||||||
- `redis://:password@localhost:6379/0` for password auth (the extra semicolon is important)
|
- ``redis://:password@localhost:6379/0``
|
||||||
- `redis:///run/redis/redis.sock?db=0` over unix sockets
|
for password auth (the extra semicolon is important)
|
||||||
|
- ``redis:///run/redis/redis.sock?db=0`` over unix sockets
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you want to use Redis over unix sockets, you'll also need to update :attr:`CELERY_BROKER_URL`
|
If you want to use Redis over unix sockets, you'll also need to update
|
||||||
|
:attr:`CELERY_BROKER_URL`
|
||||||
|
|
||||||
"""
|
"""
|
||||||
CACHES = {
|
CACHES = {
|
||||||
|
@ -736,13 +765,14 @@ CELERY_BROKER_URL = env(
|
||||||
"CELERY_BROKER_URL", default=env("CACHE_URL", default=CACHE_DEFAULT)
|
"CELERY_BROKER_URL", default=env("CACHE_URL", default=CACHE_DEFAULT)
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
URL to celery's task broker. Defaults to :attr:`CACHE_URL`, so you shouldn't have to tweak this, unless you want
|
URL to celery's task broker. Defaults to :attr:`CACHE_URL`,
|
||||||
|
so you shouldn't have to tweak this, unless you want
|
||||||
to use a different one, or use Redis sockets to connect.
|
to use a different one, or use Redis sockets to connect.
|
||||||
|
|
||||||
Exemple:
|
Exemple:
|
||||||
|
|
||||||
- `redis://127.0.0.1:6379/0`
|
- ``redis://127.0.0.1:6379/0``
|
||||||
- `redis+socket:///run/redis/redis.sock?virtual_host=0`
|
- ``redis+socket:///run/redis/redis.sock?virtual_host=0``
|
||||||
"""
|
"""
|
||||||
# END CELERY
|
# END CELERY
|
||||||
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
|
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
|
||||||
|
@ -825,7 +855,8 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||||
]
|
]
|
||||||
DISABLE_PASSWORD_VALIDATORS = env.bool("DISABLE_PASSWORD_VALIDATORS", default=False)
|
DISABLE_PASSWORD_VALIDATORS = env.bool("DISABLE_PASSWORD_VALIDATORS", default=False)
|
||||||
"""
|
"""
|
||||||
Wether to disable password validators (length, common words, similarity with username…) used during regitration.
|
Wether to disable password validators (length, common words,
|
||||||
|
similarity with username…) used during regitration.
|
||||||
"""
|
"""
|
||||||
if DISABLE_PASSWORD_VALIDATORS:
|
if DISABLE_PASSWORD_VALIDATORS:
|
||||||
AUTH_PASSWORD_VALIDATORS = []
|
AUTH_PASSWORD_VALIDATORS = []
|
||||||
|
@ -864,7 +895,8 @@ REST_FRAMEWORK = {
|
||||||
}
|
}
|
||||||
THROTTLING_ENABLED = env.bool("THROTTLING_ENABLED", default=True)
|
THROTTLING_ENABLED = env.bool("THROTTLING_ENABLED", default=True)
|
||||||
"""
|
"""
|
||||||
Wether to enable throttling (also known as rate-limiting). Leaving this enabled is recommended
|
Wether to enable throttling (also known as rate-limiting).
|
||||||
|
Leaving this enabled is recommended
|
||||||
especially on public pods, to improve the quality of service.
|
especially on public pods, to improve the quality of service.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -1014,9 +1046,9 @@ THROTTLING_RATES = {
|
||||||
}
|
}
|
||||||
THROTTLING_RATES = THROTTLING_RATES
|
THROTTLING_RATES = THROTTLING_RATES
|
||||||
"""
|
"""
|
||||||
Throttling rates for specific endpoints and features of the app. You can tweak this if you are
|
Throttling rates for specific endpoints and features of the app.
|
||||||
encountering to severe rate limiting issues or, on the contrary, if you want to reduce
|
You can tweak this if you are encountering to severe rate limiting issues or,
|
||||||
the consumption on some endpoints.
|
on the contrary, if you want to reduce the consumption on some endpoints.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -1038,8 +1070,8 @@ ATOMIC_REQUESTS = False
|
||||||
USE_X_FORWARDED_HOST = True
|
USE_X_FORWARDED_HOST = True
|
||||||
USE_X_FORWARDED_PORT = True
|
USE_X_FORWARDED_PORT = True
|
||||||
|
|
||||||
# Wether we should use Apache, Nginx (or other) headers when serving audio files
|
# Wether we should use Apache, Nginx (or other) headers
|
||||||
# Default to Nginx
|
# when serving audio files. Defaults to Nginx.
|
||||||
REVERSE_PROXY_TYPE = env("REVERSE_PROXY_TYPE", default="nginx")
|
REVERSE_PROXY_TYPE = env("REVERSE_PROXY_TYPE", default="nginx")
|
||||||
"""
|
"""
|
||||||
Depending on the reverse proxy used in front of your funkwhale instance,
|
Depending on the reverse proxy used in front of your funkwhale instance,
|
||||||
|
@ -1051,19 +1083,19 @@ assert REVERSE_PROXY_TYPE in ["apache2", "nginx"], "Unsupported REVERSE_PROXY_TY
|
||||||
|
|
||||||
PROTECT_FILES_PATH = env("PROTECT_FILES_PATH", default="/_protected")
|
PROTECT_FILES_PATH = env("PROTECT_FILES_PATH", default="/_protected")
|
||||||
"""
|
"""
|
||||||
Which path will be used to process the internal redirection to the reverse proxy
|
Which path will be used to process the internal redirection
|
||||||
**DO NOT** put a slash at the end.
|
to the reverse proxy **DO NOT** put a slash at the end.
|
||||||
|
|
||||||
You shouldn't have to tweak this.
|
You shouldn't have to tweak this.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MUSICBRAINZ_CACHE_DURATION = env.int("MUSICBRAINZ_CACHE_DURATION", default=300)
|
MUSICBRAINZ_CACHE_DURATION = env.int("MUSICBRAINZ_CACHE_DURATION", default=300)
|
||||||
"""
|
"""
|
||||||
How long to cache MusicBrainz results, in seconds
|
How long to cache MusicBrainz results, in seconds.
|
||||||
"""
|
"""
|
||||||
MUSICBRAINZ_HOSTNAME = env("MUSICBRAINZ_HOSTNAME", default="musicbrainz.org")
|
MUSICBRAINZ_HOSTNAME = env("MUSICBRAINZ_HOSTNAME", default="musicbrainz.org")
|
||||||
"""
|
"""
|
||||||
Use this setting to change the musicbrainz hostname, for instance to
|
Use this setting to change the MusicBrainz hostname, for instance to
|
||||||
use a mirror. The hostname can also contain a port number.
|
use a mirror. The hostname can also contain a port number.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -1077,10 +1109,10 @@ ADMIN_URL = env("DJANGO_ADMIN_URL", default="^api/admin/")
|
||||||
"""
|
"""
|
||||||
Path to the Django admin area.
|
Path to the Django admin area.
|
||||||
|
|
||||||
Exemples:
|
Examples:
|
||||||
|
|
||||||
- `^api/admin/`
|
- ``^api/admin/``
|
||||||
- `^api/mycustompath/`
|
- ``^api/mycustompath/``
|
||||||
|
|
||||||
"""
|
"""
|
||||||
CSRF_USE_SESSIONS = True
|
CSRF_USE_SESSIONS = True
|
||||||
|
@ -1111,11 +1143,13 @@ ACCOUNT_USERNAME_BLACKLIST = [
|
||||||
"actor",
|
"actor",
|
||||||
] + env.list("ACCOUNT_USERNAME_BLACKLIST", default=[])
|
] + env.list("ACCOUNT_USERNAME_BLACKLIST", default=[])
|
||||||
"""
|
"""
|
||||||
List of usernames that will be unavailable during registration.
|
List of usernames that will be unavailable during registration,
|
||||||
|
given as a list of strings.
|
||||||
"""
|
"""
|
||||||
EXTERNAL_REQUESTS_VERIFY_SSL = env.bool("EXTERNAL_REQUESTS_VERIFY_SSL", default=True)
|
EXTERNAL_REQUESTS_VERIFY_SSL = env.bool("EXTERNAL_REQUESTS_VERIFY_SSL", default=True)
|
||||||
"""
|
"""
|
||||||
Wether to enforce HTTPS certificates verification when doing outgoing HTTP requests (typically with federation).
|
Wether to enforce HTTPS certificates verification when doing outgoing HTTP
|
||||||
|
requests (typically with federation).
|
||||||
Disabling this is not recommended.
|
Disabling this is not recommended.
|
||||||
"""
|
"""
|
||||||
EXTERNAL_REQUESTS_TIMEOUT = env.int("EXTERNAL_REQUESTS_TIMEOUT", default=10)
|
EXTERNAL_REQUESTS_TIMEOUT = env.int("EXTERNAL_REQUESTS_TIMEOUT", default=10)
|
||||||
|
@ -1125,21 +1159,21 @@ Default timeout for external requests.
|
||||||
|
|
||||||
MUSIC_DIRECTORY_PATH = env("MUSIC_DIRECTORY_PATH", default=None)
|
MUSIC_DIRECTORY_PATH = env("MUSIC_DIRECTORY_PATH", default=None)
|
||||||
"""
|
"""
|
||||||
The path on your server where Funkwhale can import files using :ref:`in-place import
|
The path on your server where Funkwhale can import files using
|
||||||
<in-place-import>`. It must be readable by the webserver and Funkwhale
|
:ref:`in-place import <in-place-import>`. It must be readable by the webserver
|
||||||
api and worker processes.
|
and Funkwhale api and worker processes.
|
||||||
|
|
||||||
On docker installations, we recommend you use the default of ``/music``
|
On docker installations, we recommend you use the default of ``/music``
|
||||||
for this value. For non-docker installation, you can use any absolute path.
|
for this value. For non-docker installation, you can use any absolute path.
|
||||||
``/srv/funkwhale/data/music`` is a safe choice if you don't know what to use.
|
``/srv/funkwhale/data/music`` is a safe choice if you don't know what to use.
|
||||||
|
|
||||||
.. note:: This path should not include any trailing slash
|
.. note:: This path should not include any trailing slash.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
You need to adapt your :ref:`reverse-proxy configuration<reverse-proxy-setup>` to
|
You need to adapt your :ref:`reverse proxy configuration
|
||||||
serve the directory pointed by ``MUSIC_DIRECTORY_PATH`` on
|
<reverse-proxy-setup>` to serve the directory pointed by
|
||||||
``/_protected/music`` URL.
|
``MUSIC_DIRECTORY_PATH`` on ``/_protected/music`` URL.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
MUSIC_DIRECTORY_SERVE_PATH = env(
|
MUSIC_DIRECTORY_SERVE_PATH = env(
|
||||||
|
@ -1149,7 +1183,8 @@ MUSIC_DIRECTORY_SERVE_PATH = env(
|
||||||
Default: :attr:`MUSIC_DIRECTORY_PATH`
|
Default: :attr:`MUSIC_DIRECTORY_PATH`
|
||||||
|
|
||||||
When using Docker, the value of :attr:`MUSIC_DIRECTORY_PATH` in your containers
|
When using Docker, the value of :attr:`MUSIC_DIRECTORY_PATH` in your containers
|
||||||
may differ from the real path on your host. Assuming you have the following directive
|
may differ from the real path on your host.
|
||||||
|
Assuming you have the following directive
|
||||||
in your :file:`docker-compose.yml` file::
|
in your :file:`docker-compose.yml` file::
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -1160,7 +1195,7 @@ Then, the value of :attr:`MUSIC_DIRECTORY_SERVE_PATH` should be
|
||||||
|
|
||||||
On non-docker setup, you don't need to configure this setting.
|
On non-docker setup, you don't need to configure this setting.
|
||||||
|
|
||||||
.. note:: This path should not include any trailing slash
|
.. note:: This path should not include any trailing slash.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# When this is set to default=True, we need to reenable migration music/0042
|
# When this is set to default=True, we need to reenable migration music/0042
|
||||||
|
@ -1171,7 +1206,7 @@ USERS_INVITATION_EXPIRATION_DAYS = env.int(
|
||||||
"USERS_INVITATION_EXPIRATION_DAYS", default=14
|
"USERS_INVITATION_EXPIRATION_DAYS", default=14
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Expiration delay in days, for user invitations.
|
Expiration delay, in days, for user invitations.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSATILEIMAGEFIELD_RENDITION_KEY_SETS = {
|
VERSATILEIMAGEFIELD_RENDITION_KEY_SETS = {
|
||||||
|
@ -1206,13 +1241,15 @@ Default format for transcoding when using Subsonic API.
|
||||||
# extra tags will be ignored
|
# extra tags will be ignored
|
||||||
TAGS_MAX_BY_OBJ = env.int("TAGS_MAX_BY_OBJ", default=30)
|
TAGS_MAX_BY_OBJ = env.int("TAGS_MAX_BY_OBJ", default=30)
|
||||||
"""
|
"""
|
||||||
Maximum number of tags that can be associated with an object. Extra tags will be ignored.
|
Maximum number of tags that can be associated with an object.
|
||||||
|
Extra tags will be ignored.
|
||||||
"""
|
"""
|
||||||
FEDERATION_OBJECT_FETCH_DELAY = env.int(
|
FEDERATION_OBJECT_FETCH_DELAY = env.int(
|
||||||
"FEDERATION_OBJECT_FETCH_DELAY", default=60 * 24 * 3
|
"FEDERATION_OBJECT_FETCH_DELAY", default=60 * 24 * 3
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Number of minutes before a remote object will be automatically refetched when accessed in the UI.
|
Delay, in minutes, before a remote object will be automatically
|
||||||
|
refetched when accessed in the UI.
|
||||||
"""
|
"""
|
||||||
MODERATION_EMAIL_NOTIFICATIONS_ENABLED = env.bool(
|
MODERATION_EMAIL_NOTIFICATIONS_ENABLED = env.bool(
|
||||||
"MODERATION_EMAIL_NOTIFICATIONS_ENABLED", default=True
|
"MODERATION_EMAIL_NOTIFICATIONS_ENABLED", default=True
|
||||||
|
@ -1230,25 +1267,25 @@ Delay, in seconds, between two manual fetch of the same remote object.
|
||||||
"""
|
"""
|
||||||
INSTANCE_SUPPORT_MESSAGE_DELAY = env.int("INSTANCE_SUPPORT_MESSAGE_DELAY", default=15)
|
INSTANCE_SUPPORT_MESSAGE_DELAY = env.int("INSTANCE_SUPPORT_MESSAGE_DELAY", default=15)
|
||||||
"""
|
"""
|
||||||
Delay in days after signup before we show the "support your pod" message
|
Delay after signup, in days, before the "support your pod" message is shown.
|
||||||
"""
|
"""
|
||||||
FUNKWHALE_SUPPORT_MESSAGE_DELAY = env.int("FUNKWHALE_SUPPORT_MESSAGE_DELAY", default=15)
|
FUNKWHALE_SUPPORT_MESSAGE_DELAY = env.int("FUNKWHALE_SUPPORT_MESSAGE_DELAY", default=15)
|
||||||
"""
|
"""
|
||||||
Delay in days after signup before we show the "support Funkwhale" message
|
Delay after signup, in days, before the "support Funkwhale" message is shown.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MIN_DELAY_BETWEEN_DOWNLOADS_COUNT = env.int(
|
MIN_DELAY_BETWEEN_DOWNLOADS_COUNT = env.int(
|
||||||
"MIN_DELAY_BETWEEN_DOWNLOADS_COUNT", default=60 * 60 * 6
|
"MIN_DELAY_BETWEEN_DOWNLOADS_COUNT", default=60 * 60 * 6
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Minimum required period, in seconds, for two downloads of the same track by the same IP
|
Minimum required period, in seconds, for two downloads of the same track
|
||||||
or user to be recorded in statistics.
|
by the same IP or user to be recorded in statistics.
|
||||||
"""
|
"""
|
||||||
MARKDOWN_EXTENSIONS = env.list("MARKDOWN_EXTENSIONS", default=["nl2br", "extra"])
|
MARKDOWN_EXTENSIONS = env.list("MARKDOWN_EXTENSIONS", default=["nl2br", "extra"])
|
||||||
"""
|
"""
|
||||||
List of markdown extensions to enable.
|
List of markdown extensions to enable.
|
||||||
|
|
||||||
Cf `<https://python-markdown.github.io/extensions/>`_
|
See `<https://python-markdown.github.io/extensions/>`_.
|
||||||
"""
|
"""
|
||||||
LINKIFIER_SUPPORTED_TLDS = ["audio"] + env.list("LINKINFIER_SUPPORTED_TLDS", default=[])
|
LINKIFIER_SUPPORTED_TLDS = ["audio"] + env.list("LINKINFIER_SUPPORTED_TLDS", default=[])
|
||||||
"""
|
"""
|
||||||
|
@ -1256,14 +1293,16 @@ Additional TLDs to support with our markdown linkifier.
|
||||||
"""
|
"""
|
||||||
EXTERNAL_MEDIA_PROXY_ENABLED = env.bool("EXTERNAL_MEDIA_PROXY_ENABLED", default=True)
|
EXTERNAL_MEDIA_PROXY_ENABLED = env.bool("EXTERNAL_MEDIA_PROXY_ENABLED", default=True)
|
||||||
"""
|
"""
|
||||||
Wether to proxy attachment files hosted on third party pods and and servers. Keeping
|
Wether to proxy attachment files hosted on third party pods and and servers.
|
||||||
this to true is recommended, to reduce leaking browsing information of your users, and
|
Keeping this to true is recommended, to reduce leaking browsing information
|
||||||
reduce the bandwidth used on remote pods.
|
of your users, and reduce the bandwidth used on remote pods.
|
||||||
"""
|
"""
|
||||||
PODCASTS_THIRD_PARTY_VISIBILITY = env("PODCASTS_THIRD_PARTY_VISIBILITY", default="me")
|
PODCASTS_THIRD_PARTY_VISIBILITY = env("PODCASTS_THIRD_PARTY_VISIBILITY", default="me")
|
||||||
"""
|
"""
|
||||||
By default, only people who subscribe to a podcast RSS will have access to their episodes.
|
By default, only people who subscribe to a podcast RSS will have access
|
||||||
switch to "instance" or "everyone" to change that.
|
to their episodes.
|
||||||
|
|
||||||
|
Switch to "instance" or "everyone" to change that.
|
||||||
|
|
||||||
Changing it only affect new podcasts.
|
Changing it only affect new podcasts.
|
||||||
"""
|
"""
|
||||||
|
@ -1271,7 +1310,9 @@ PODCASTS_RSS_FEED_REFRESH_DELAY = env.int(
|
||||||
"PODCASTS_RSS_FEED_REFRESH_DELAY", default=60 * 60 * 24
|
"PODCASTS_RSS_FEED_REFRESH_DELAY", default=60 * 60 * 24
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Delay in seconds between to fetch of RSS feeds. Reducing this mean you'll receive new episodes faster,
|
Delay, in seconds, between two fetch of RSS feeds.
|
||||||
|
|
||||||
|
Reducing this mean you'll receive new episodes faster,
|
||||||
but will require more resources.
|
but will require more resources.
|
||||||
"""
|
"""
|
||||||
# maximum items loaded through XML feed
|
# maximum items loaded through XML feed
|
||||||
|
@ -1284,7 +1325,8 @@ IGNORE_FORWARDED_HOST_AND_PROTO = env.bool(
|
||||||
"IGNORE_FORWARDED_HOST_AND_PROTO", default=True
|
"IGNORE_FORWARDED_HOST_AND_PROTO", default=True
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
Use :attr:`FUNKWHALE_HOSTNAME` and :attr:`FUNKWHALE_PROTOCOL ` instead of request header.
|
Use :attr:`FUNKWHALE_HOSTNAME` and :attr:`FUNKWHALE_PROTOCOL`
|
||||||
|
instead of request header.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
HASHING_ALGORITHM = "sha256"
|
HASHING_ALGORITHM = "sha256"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Added email configuration to the documentation (#1481)
|
|
@ -163,6 +163,15 @@ Subsonic
|
||||||
|
|
||||||
.. autodata:: config.settings.common.SUBSONIC_DEFAULT_TRANSCODING_FORMAT
|
.. autodata:: config.settings.common.SUBSONIC_DEFAULT_TRANSCODING_FORMAT
|
||||||
|
|
||||||
|
Email configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autodata:: config.settings.common.EMAIL_CONFIG
|
||||||
|
:annotation: = consolemail://
|
||||||
|
.. autodata:: config.settings.common.DEFAULT_FROM_EMAIL
|
||||||
|
:annotation: = Funkwhale <noreply@yourdomain>
|
||||||
|
.. autodata:: config.settings.common.EMAIL_SUBJECT_PREFIX
|
||||||
|
|
||||||
Other settings
|
Other settings
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue