env.prod.sample 6.64 KB
Newer Older
1
2
3
# If you have any doubts about what a setting does,
# check https://docs.funkwhale.audio/configuration.html#configuration-reference

4
# If you're tweaking this file from the template, ensure you edit at least the
5
6
# following variables:
# - DJANGO_SECRET_KEY
7
# - FUNKWHALE_HOSTNAME
8
# - EMAIL_CONFIG and DEFAULT_FROM_EMAIL if you plan to send emails)
9
# On non-docker setup **only**, you'll also have to tweak/uncomment those variables:
10
11
# - DATABASE_URL
# - CACHE_URL
12
13
#
# You **don't** need to update those variables on pure docker setups.
14
15
16
17
#
# Additional options you may want to check:
# - MUSIC_DIRECTORY_PATH and MUSIC_DIRECTORY_SERVE_PATH if you plan to use
#   in-place import
18
#
19
20
21
22
23
# Docker only
# -----------

# The tag of the image we should use
# (it will be interpolated in docker-compose file)
24
# You can comment or ignore this if you're not using docker
25
26
FUNKWHALE_VERSION=latest

27
# End of Docker-only configuration
28
29
30
31
32
33
34

# General configuration
# ---------------------

# Set this variables to bind the API server to another interface/port
# example: FUNKWHALE_API_IP=0.0.0.0
# example: FUNKWHALE_API_PORT=5678
35
36
FUNKWHALE_API_IP=127.0.0.1
FUNKWHALE_API_PORT=5000
37
38
# The number of web workers to start in parallel. Higher means you can handle
# more concurrent requests, but also leads to higher CPU/Memory usage
39
FUNKWHALE_WEB_WORKERS=4
40
# Replace this by the definitive, public domain you will use for
41
42
# your instance. It cannot be changed after initial deployment
# without breaking your instance.
43
44
FUNKWHALE_HOSTNAME=yourdomain.funkwhale
FUNKWHALE_PROTOCOL=https
45

46
# Log level (debug, info, warning, error, critical)
47
LOGLEVEL=error
48

49
50
51
52
53
54
# Configure email sending using this variale
# By default, funkwhale will output emails sent to stdout
# here are a few examples for this setting
# EMAIL_CONFIG=consolemail://         # output emails to console (the default)
# EMAIL_CONFIG=dummymail://          # disable email sending completely
# On a production instance, you'll usually want to use an external SMTP server:
Eliot Berriot's avatar
Typo    
Eliot Berriot committed
55
56
57
# EMAIL_CONFIG=smtp://user@:password@youremail.host:25
# EMAIL_CONFIG=smtp+ssl://user@:password@youremail.host:465
# EMAIL_CONFIG=smtp+tls://user@:password@youremail.host:587
58

59
60
61
62
# Make email verification mandatory before using the service
# Doesn't apply to admins.
# ACCOUNT_EMAIL_VERIFICATION_ENFORCE=false

Andrew Morgan's avatar
Andrew Morgan committed
63
# The email address to use to send system emails.
64
65
# DEFAULT_FROM_EMAIL=noreply@yourdomain

66
67
68
69
# Depending on the reverse proxy used in front of your funkwhale instance,
# the API will use different kind of headers to serve audio files
# Allowed values: nginx, apache2
REVERSE_PROXY_TYPE=nginx
70

71
72
# API/Django configuration

73
74
75
76
77
78
# Database configuration
# Examples:
#  DATABASE_URL=postgresql://<user>:<password>@<host>:<port>/<database>
#  DATABASE_URL=postgresql://funkwhale:passw0rd@localhost:5432/funkwhale_database
# Use the next one if you followed Debian installation guide
# DATABASE_URL=postgresql://funkwhale@:5432/funkwhale
79

80
81
82
# Cache configuration
# Examples:
#  CACHE_URL=redis://<host>:<port>/<database>
83
84
85
86
#  CACHE_URL=redis://localhost:6379/0c
#  With a password:
#  CACHE_URL=redis://:password@localhost:6379/0
#  (the extra semicolon is important)
87
# Use the next one if you followed Debian installation guide
88
#
89
# CACHE_URL=redis://127.0.0.1:6379/0
90
91
92
93
94
95
96
#
# If you want to use Redis over unix sockets, you'll actually need two variables:
# For the cache part:
#  CACHE_URL=redis:///run/redis/redis.sock?db=0
# For the Celery/asynchronous tasks part:
#  CELERY_BROKER_URL=redis+socket:///run/redis/redis.sock?virtual_host=0

97
98
99
100
101
102
# Number of worker processes to execute. Defaults to 0, in which case it uses your number of CPUs
# Celery workers handle background tasks (such file imports or federation
# messaging). The more processes a worker gets, the more tasks
# can be processed in parallel. However, more processes also means
# a bigger memory footprint.
# CELERYD_CONCURRENCY=0
103
104
105
106

# Where media files (such as album covers or audio tracks) should be stored
# on your system?
# (Ensure this directory actually exists)
107
MEDIA_ROOT=/srv/funkwhale/data/media
108

109
110
111
# Where static files (such as API css or icons) should be compiled
# on your system?
# (Ensure this directory actually exists)
112
STATIC_ROOT=/srv/funkwhale/data/static
113

114
115
116
117
118
119
120
121
122
123
124
# which settings module should django use?
# You don't have to touch this unless you really know what you're doing
DJANGO_SETTINGS_MODULE=config.settings.production

# Generate one using `openssl rand -base64 45`, for example
DJANGO_SECRET_KEY=

# You don't have to edit this, but you can put the admin on another URL if you
# want to
# DJANGO_ADMIN_URL=^api/admin/

125
126
127
# In-place import settings
# You can safely leave those settings uncommented if you don't plan to use
# in place imports.
128
# Typical docker setup:
129
130
#   MUSIC_DIRECTORY_PATH=/music  # docker-only
#   MUSIC_DIRECTORY_SERVE_PATH=/srv/funkwhale/data/music
131
132
133
# Typical non-docker setup:
#   MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music
#   # MUSIC_DIRECTORY_SERVE_PATH= # stays commented, not needed
134

135
136
MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music
MUSIC_DIRECTORY_SERVE_PATH=/srv/funkwhale/data/music
137
138
139
140
141
142
143
144
145
146
147
148
149
150

# LDAP settings
# Use the following options to allow authentication on your Funkwhale instance
# using a LDAP directory.
# Have a look at https://docs.funkwhale.audio/installation/ldap.html for
# detailed instructions.

# LDAP_ENABLED=False
# LDAP_SERVER_URI=ldap://your.server:389
# LDAP_BIND_DN=cn=admin,dc=domain,dc=com
# LDAP_BIND_PASSWORD=bindpassword
# LDAP_SEARCH_FILTER=(|(cn={0})(mail={0}))
# LDAP_START_TLS=False
# LDAP_ROOT_DN=dc=domain,dc=com
151
152
153
154

FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/front/dist

# Nginx related configuration
155
NGINX_MAX_BODY_SIZE=100M
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

## External storages configuration
# Funkwhale can store uploaded files on Amazon S3 and S3-compatible storages (such as Minio)
# Uncomment and fill the variables below

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_STORAGE_BUCKET_NAME=
# An optional bucket subdirectory were you want to store the files. This is especially useful
# if you plan to use share the bucket with other services
# AWS_LOCATION=

# If you use a S3-compatible storage such as minio, set the following variable
# the full URL to the storage server. Example:
#   AWS_S3_ENDPOINT_URL=https://minio.mydomain.com
# AWS_S3_ENDPOINT_URL=
172
173
174
175
176
177
178
179

# If you want to serve media directly from your S3 bucket rather than through a proxy,
# set this to true
# PROXY_MEDIA=false

# If you are using Amazon S3 to serve media directly, you will need to specify your region
# name in order to access files. Example:
#   AWS_S3_REGION_NAME=eu-west-2
180
# AWS_S3_REGION_NAME=
181
182
183
184

# If you are using Amazon S3, use this setting to configure how long generated URLs should stay
# valid. The default value is 3600 (60 minutes). The maximum accepted value is 604800 (7 days)

185
# AWS_QUERYSTRING_EXPIRE=