1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00

Update lufi.conf.template

This commit is contained in:
ericgaspar 2021-08-16 11:59:26 +02:00
parent e1a7bfc3c9
commit 989c9796db
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -18,17 +18,17 @@
clients => 1, clients => 1,
}, },
# put a way to contact you here and uncomment it # Put a way to contact you here and uncomment it
# you can put some HTML in it # You can put some HTML in it
# MANDATORY # MANDATORY
contact => '<a href="mailto:webmaster@__DOMAIN__">Contact page</a>', contact => '<a href="mailto:webmaster@__DOMAIN__">Contact page</a>',
# put an URL or an email address to receive file reports and uncomment it # Put an URL or an email address to receive file reports and uncomment it
# it's for make reporting illegal files easy for users # It's for make reporting illegal files easy for users
# MANDATORY # MANDATORY
report => 'webmaster@__DOMAIN__', report => 'webmaster@__DOMAIN__',
# array of random strings used to encrypt cookies # Array of random strings used to encrypt cookies
# optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT # optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT
secrets => ['__SECRET__'], secrets => ['__SECRET__'],
@ -36,53 +36,53 @@
# optional, default is Lufi # optional, default is Lufi
#instance_name => 'Lufi', #instance_name => 'Lufi',
# choose a theme. See the available themes in `themes` directory # Choose a theme. See the available themes in `themes` directory
# optional, default is 'default' # Optional, default is 'default'
#theme => 'default', #theme => 'default',
# length of the random URL # Length of the random URL
# optional, default is 8 # optional, default is 8
#length => 8, #length => 8,
# how many URLs will be provisioned in a batch ? # How many URLs will be provisioned in a batch ?
# optional, default is 5 # optional, default is 5
#provis_step => 5, #provis_step => 5,
# max number of URLs to be provisioned # Max number of URLs to be provisioned
# optional, default is 100 # optional, default is 100
#provisioning => 100, #provisioning => 100,
# length of the modify/delete token # Length of the modify/delete token
# optional, default is 32 # optional, default is 32
#token_length => 32, #token_length => 32,
# max file size, in octets # Max file size, in octets
# you can write it 100*1024*1024 # You can write it 100*1024*1024
# optional, no default # optional, no default
max_file_size => __MAX_FILE_SIZE__*1024*1024, max_file_size => __MAX_FILE_SIZE__*1024*1024,
# if you want to have piwik statistics, provide a piwik image tracker # If you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript # Only the image tracker is allowed, no javascript
# optional, no default # optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1', #piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# broadcast_message which will displayed on the index page # Broadcast_message which will displayed on the index page
# optional, no default # optional, no default
#broadcast_message => 'Maintenance', #broadcast_message => 'Maintenance',
# default time limit for files # Default time limit for files
# valid values are 0, 1, 7, 30 and 365 # Valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit) # optional, default is 0 (no limit)
default_delay => 365, default_delay => 365,
# Number of days after which the files will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay) # Number of days after which the files will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage # A warning message will be displayed on homepage
# optional, default is 0 (no limit) # optional, default is 0 (no limit)
#max_delay => 0, #max_delay => 0,
# size thresholds: if you want to define max delays for different sizes of file # Size thresholds: if you want to define max delays for different sizes of file
# the keys are size in Bytes, you can't have 10*1000*10000 as key # The keys are size in Bytes, you can't have 10*1000*10000 as key
# if a file is smaller than the smallest configured size, it will have a expiration delay of max_delay (see above) # If a file is smaller than the smallest configured size, it will have a expiration delay of max_delay (see above)
# optional, default is using max_delay (see above) for all sizes # optional, default is using max_delay (see above) for all sizes
#delay_for_size => { #delay_for_size => {
# 10000000 => 90, # between 10MB and 50MB => max is 90 days, less than 10MB => max is max_delay (see above) # 10000000 => 90, # between 10MB and 50MB => max is 90 days, less than 10MB => max is max_delay (see above)
@ -96,33 +96,53 @@
# optional, defaut is / # optional, defaut is /
prefix => '__PATH__', prefix => '__PATH__',
# array of authorized domains for API calls. # Array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*'] # If you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default # optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'], #allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# String of the URL to be redirected to when accessing /logout
# optional, default is no redirection after logging out
#logout_custom => 'https://sso.example.com/logout?redirect_uri=https%3A%2F%2Fexample.com',
# Define a path to the upload directory, where the uploaded files will be stored # Define a path to the upload directory, where the uploaded files will be stored
# You can define it relative to lufi directory or set an absolute path # You can define it relative to lufi directory or set an absolute path
# Remember that it has to be in a directory writable by Lufi user # Remember that it has to be in a directory writable by Lufi user
# DO NOT CHANGE THIS IF FILES HAVE BEEN ALREADY UPLOADED: THEY WILL NOT BE DOWNLOADABLE ANYMORE
# optional, default is 'files' # optional, default is 'files'
upload_dir => '/home/yunohost.app/__APP__', upload_dir => '/home/yunohost.app/__APP__',
# allow to add a password on files, asked before allowing to download files #!!!!!!!!!!!!!!!
# EXPERIMENTAL !
#!!!!!!!!!!!!!!!
# You can store files on Swift object storage (https://en.wikipedia.org/wiki/OpenStack#Swift) instead of filesystem
# Please read https://metacpan.org/pod/Net::OpenStack::Swift#SYNOPSIS to know how to configure this setting
# IMPORTANT: add a `container` key in it, to let Lufi know which container to use. This is not a regular Net::OpenStack::Swift setting, but Lufi need it.
# EXPERIMENTAL: if the upload or download of files are stucked, reload Lufi and create a cron task to reload Lufi once a day
# You can copy Lufi files to Swift object storage by launching the command `carton exec script/lufi copyFilesToSwift` (can take a long time)
# optional, no default
#swift => {
# auth_url => 'https://auth-endpoint-url/v2.0',
# user => 'userid',
# password => 'password',
# tenant_name => 'project_id',
# container => 'lufi'
#},
# Allow to add a password on files, asked before allowing to download files
# optional, default is 0 # optional, default is 0
allow_pwd_on_files => 1, allow_pwd_on_files => 1,
# force all files to be in "Burn after reading mode" # Force all files to be in "Burn after reading mode"
# optional, default is 0 # optional, default is 0
#force_burn_after_reading => 0, #force_burn_after_reading => 0,
# if set, the files' URLs will always use this domain # If set, the files' URLs will always use this domain
# optional, no default # optional, no default
#fixed_domain => 'example.org', #fixed_domain => 'example.org',
# abuse reasons # Abuse reasons
# set an integer in the abuse field of a file in the database and it will not be downloadable anymore # Set an integer in the abuse field of a file in the database and it will not be downloadable anymore
# the reason will be displayed to the downloader, according to the reasons you will configure here. # The reason will be displayed to the downloader, according to the reasons you will configure here.
# optional, no default # optional, no default
#abuse => { #abuse => {
# 0 => 'Copyright infringment', # 0 => 'Copyright infringment',
@ -135,7 +155,7 @@
# Mail configuration # Mail configuration
# See https://metacpan.org/pod/Mojolicious::Plugin::Mail#EXAMPLES # See https://metacpan.org/pod/Mojolicious::Plugin::Mail#EXAMPLES
# Optional, default to sendmail method with no arguments # optional, default to sendmail method with no arguments
#mail => { #mail => {
# # Valid values are 'sendmail' and 'smtp' # # Valid values are 'sendmail' and 'smtp'
# how => 'smtp', # how => 'smtp',
@ -143,27 +163,31 @@
#}, #},
# Email sender address # Email sender address
# Optional, default to no-reply@lufi.io # optional, default to no-reply@lufi.io
#mail_sender => 'no-reply@lufi.io', #mail_sender => 'no-reply@lufi.io',
# Disable sending mail through the server
# optional, default is false
#disable_mail_sending => 0,
############# #############
# DB settings # DB settings
############# #############
# choose what database you want to use # Choose what database you want to use
# valid choices are sqlite, postgresql and mysql (all lowercase) # Valid choices are sqlite, postgresql and mysql (all lowercase)
# optional, default is sqlite # optional, default is sqlite
dbtype => 'postgresql', dbtype => 'postgresql',
# SQLite ONLY - only used if dbtype is set to sqlite # SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database # Define a path to the SQLite database
# you can define it relative to lufi directory or set an absolute path # You can define it relative to lufi directory or set an absolute path
# remember that it has to be in a directory writable by Lufi user # Remember that it has to be in a directory writable by Lufi user
# optional, default is lufi.db # optional, default is lufi.db
#db_path => 'lufi.db', #db_path => 'lufi.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql # PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database # These are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype # mandatory if you choosed postgresql as dbtype
pgdb => { pgdb => {
database => '__DB_NAME__', database => '__DB_NAME__',
@ -178,7 +202,7 @@
}, },
# MySQL ONLY - only used if dbtype is set to mysql # MySQL ONLY - only used if dbtype is set to mysql
# these are the credentials to access the MySQL database # These are the credentials to access the MySQL database
# mandatory if you choosed mysql as dbtype # mandatory if you choosed mysql as dbtype
#mysqldb => { #mysqldb => {
# database => 'lufi', # database => 'lufi',
@ -196,8 +220,8 @@
# LDAP settings (authentication and features) # LDAP settings (authentication and features)
############################################# #############################################
# set `ldap` if you want that only authenticated users can upload files # Set `ldap` if you want that only authenticated users can upload files
# please note that everybody can still download files # Please note that everybody can still download files
# optional, no default # optional, no default
__IS_PUBLIC__ldap => { __IS_PUBLIC__ldap => {
__IS_PUBLIC__ uri => 'ldap://localhost:389', # server URI __IS_PUBLIC__ uri => 'ldap://localhost:389', # server URI
@ -214,7 +238,7 @@
__IS_PUBLIC__ #} __IS_PUBLIC__ #}
__IS_PUBLIC__}, __IS_PUBLIC__},
# if you've set ldap above, the session will last `session_duration` seconds before # If you've set ldap above, the session will last `session_duration` seconds before
# the user needs to reauthenticate # the user needs to reauthenticate
# optional, default is 3600 # optional, default is 3600
#session_duration => 3600, #session_duration => 3600,
@ -271,8 +295,8 @@
# Htpasswd authentication # Htpasswd authentication
######################### #########################
# set `htpasswd` if you want to use an htpasswd file instead of ldap # Set `htpasswd` if you want to use an htpasswd file instead of ldap
# see 'man htpasswd' to know how to create such file # See 'man htpasswd' to know how to create such file
#htpasswd => 'lufi.passwd', #htpasswd => 'lufi.passwd',
####################### #######################
@ -311,24 +335,28 @@
# Lufi cron jobs settings # Lufi cron jobs settings
######################### #########################
# number of days senders' IP addresses are kept in database # Expired files will be kept for 2 additional days after the expiration time has passed!
# after that delay, they will be deleted from database (used with script/lufi cron cleanbdd) # The reasoning behind this is to allow downloads to complete and avoid deleting them while
# they are still being tranfered.
# Number of days senders' IP addresses are kept in database
# After that delay, they will be deleted from database (used with script/lufi cron cleanbdd)
# optional, default is 365 # optional, default is 365
#keep_ip_during => 365, #keep_ip_during => 365,
# max size of the files directory, in octets # Max size of the files directory, in octets
# used by script/lufi cron watch to trigger an action # Used by script/lufi cron watch to trigger an action
# optional, no default # optional, no default
#max_total_size => 10*1024*1024*1024, #max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lufi cron watch) # Default action when files directory is over max_total_size (used with script/lufi cron watch)
# valid values are 'warn', 'stop-upload' and 'delete' # Valid values are 'warn', 'stop-upload' and 'delete'
# Please, see README.md # Please, see README.md
# optional, default is 'warn' # optional, default is 'warn'
#policy_when_full => 'warn', #policy_when_full => 'warn',
# Files which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task # Files which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted # If delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default # optional, no default
#delete_no_longer_viewed_files => 90, #delete_no_longer_viewed_files => 90,
}; };