mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
apply Aleks suggestions
This commit is contained in:
parent
a01da86f6b
commit
f2e0828e7a
5 changed files with 13 additions and 13 deletions
|
@ -110,12 +110,12 @@ CACHE_URL=redis://127.0.0.1:6379/__REDIS_DB__
|
||||||
# Where media files (such as album covers or audio tracks) should be stored
|
# Where media files (such as album covers or audio tracks) should be stored
|
||||||
# on your system?
|
# on your system?
|
||||||
# (Ensure this directory actually exists)
|
# (Ensure this directory actually exists)
|
||||||
MEDIA_ROOT=__DATA_DIR__/media
|
MEDIA_ROOT=__DATA_DIR__/data/media
|
||||||
|
|
||||||
# Where static files (such as API css or icons) should be compiled
|
# Where static files (such as API css or icons) should be compiled
|
||||||
# on your system?
|
# on your system?
|
||||||
# (Ensure this directory actually exists)
|
# (Ensure this directory actually exists)
|
||||||
STATIC_ROOT=__DATA_DIR__/static
|
STATIC_ROOT=__DATA_DIR__/data/static
|
||||||
|
|
||||||
# which settings module should django use?
|
# which settings module should django use?
|
||||||
# You don't have to touch this unless you really know what you're doing
|
# You don't have to touch this unless you really know what you're doing
|
||||||
|
@ -138,8 +138,8 @@ DJANGO_SECRET_KEY=__KEY__
|
||||||
# MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music
|
# MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music
|
||||||
# # MUSIC_DIRECTORY_SERVE_PATH= # stays commented, not needed
|
# # MUSIC_DIRECTORY_SERVE_PATH= # stays commented, not needed
|
||||||
|
|
||||||
MUSIC_DIRECTORY_PATH=__DATA_DIR__/music
|
MUSIC_DIRECTORY_PATH=__DATA_DIR__/data/music
|
||||||
#MUSIC_DIRECTORY_SERVE_PATH=__DATA_DIR__/import
|
#MUSIC_DIRECTORY_SERVE_PATH=__DATA_DIR__/data/import
|
||||||
|
|
||||||
# LDAP settings
|
# LDAP settings
|
||||||
# Use the following options to allow authentication on your Funkwhale instance
|
# Use the following options to allow authentication on your Funkwhale instance
|
||||||
|
|
|
@ -102,11 +102,11 @@ location /.well-known/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media/__sized__/ {
|
location /media/__sized__/ {
|
||||||
alias __DATA_DIR__/media/__sized__/;
|
alias __DATA_DIR__/data/media/__sized__/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media/attachments/ {
|
location /media/attachments/ {
|
||||||
alias __DATA_DIR__/media/attachments/;
|
alias __DATA_DIR__/data/media/attachments/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /_protected/media/ {
|
location /_protected/media/ {
|
||||||
|
@ -114,7 +114,7 @@ location /_protected/media/ {
|
||||||
# audio files once correct permission / authentication
|
# audio files once correct permission / authentication
|
||||||
# has been checked on API side
|
# has been checked on API side
|
||||||
internal;
|
internal;
|
||||||
alias __DATA_DIR__/media/;
|
alias __DATA_DIR__/data/media/;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Comment the previous location and uncomment this one if you're storing
|
# Comment the previous location and uncomment this one if you're storing
|
||||||
|
@ -132,10 +132,10 @@ location /_protected/music/ {
|
||||||
# has been checked on API side
|
# has been checked on API side
|
||||||
# Set this to the same value as your MUSIC_DIRECTORY_PATH setting
|
# Set this to the same value as your MUSIC_DIRECTORY_PATH setting
|
||||||
internal;
|
internal;
|
||||||
alias __DATA_DIR__/music/;
|
alias __DATA_DIR__/data/music/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /staticfiles/ {
|
location /staticfiles/ {
|
||||||
# django static files
|
# django static files
|
||||||
alias __DATA_DIR__/static/;
|
alias __DATA_DIR__/data/static/;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,7 @@ ram.runtime = "50M"
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
[resources.data_dir]
|
[resources.data_dir]
|
||||||
dir = "/home/yunohost.app/__APP__/data"
|
group = "www-data:rx"
|
||||||
owner = "__APP__:www-data"
|
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
|
@ -45,10 +45,10 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a data directory..." --weight=1
|
ynh_script_progression --message="Creating a data directory..." --weight=1
|
||||||
|
|
||||||
mkdir -p $data_dir/
|
mkdir -p $data_dir/data
|
||||||
mkdir -p $data_dir/{static,media,music}
|
mkdir -p $data_dir/{static,media,music}
|
||||||
|
|
||||||
chmod 750 "$data_dir/"
|
chmod 750 "$data_dir"
|
||||||
chmod -R o-rwx "$data_dir/"
|
chmod -R o-rwx "$data_dir/"
|
||||||
chown -R $app:www-data "$data_dir/"
|
chown -R $app:www-data "$data_dir/"
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$data_dir/" --not_mandatory
|
ynh_restore_file --origin_path="$data_dir/" --not_mandatory
|
||||||
|
|
||||||
|
mkdir -p $data_dir/data
|
||||||
mkdir -p $data_dir/{static,media,music}
|
mkdir -p $data_dir/{static,media,music}
|
||||||
|
|
||||||
chmod 750 "$data_dir/"
|
chmod 750 "$data_dir/"
|
||||||
|
|
Loading…
Reference in a new issue