mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
fix datadir
This commit is contained in:
parent
b5b2012c70
commit
a558ac8549
6 changed files with 14 additions and 15 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
|
||||
# on your system?
|
||||
# (Ensure this directory actually exists)
|
||||
MEDIA_ROOT=__DATA_DIR__/data/media
|
||||
MEDIA_ROOT=__DATA_DIR__/media
|
||||
|
||||
# Where static files (such as API css or icons) should be compiled
|
||||
# on your system?
|
||||
# (Ensure this directory actually exists)
|
||||
STATIC_ROOT=__DATA_DIR__/data/static
|
||||
STATIC_ROOT=__DATA_DIR__/static
|
||||
|
||||
# which settings module should django use?
|
||||
# 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_SERVE_PATH= # stays commented, not needed
|
||||
|
||||
MUSIC_DIRECTORY_PATH=__DATA_DIR__/data/music
|
||||
#MUSIC_DIRECTORY_SERVE_PATH=__DATA_DIR__/data/import
|
||||
MUSIC_DIRECTORY_PATH=__DATA_DIR__/music
|
||||
#MUSIC_DIRECTORY_SERVE_PATH=__DATA_DIR__/import
|
||||
|
||||
# LDAP settings
|
||||
# Use the following options to allow authentication on your Funkwhale instance
|
||||
|
|
|
@ -102,11 +102,11 @@ location /.well-known/ {
|
|||
}
|
||||
|
||||
location /media/__sized__/ {
|
||||
alias __DATA_DIR__/data/media/__sized__/;
|
||||
alias __DATA_DIR__/media/__sized__/;
|
||||
}
|
||||
|
||||
location /media/attachments/ {
|
||||
alias __DATA_DIR__/data/media/attachments/;
|
||||
alias __DATA_DIR__/media/attachments/;
|
||||
}
|
||||
|
||||
location /_protected/media/ {
|
||||
|
@ -114,7 +114,7 @@ location /_protected/media/ {
|
|||
# audio files once correct permission / authentication
|
||||
# has been checked on API side
|
||||
internal;
|
||||
alias __DATA_DIR__/data/media/;
|
||||
alias __DATA_DIR__/media/;
|
||||
}
|
||||
|
||||
# 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
|
||||
# Set this to the same value as your MUSIC_DIRECTORY_PATH setting
|
||||
internal;
|
||||
alias __DATA_DIR__/data/music/;
|
||||
alias __DATA_DIR__/music/;
|
||||
}
|
||||
|
||||
location /staticfiles/ {
|
||||
# django static files
|
||||
alias __DATA_DIR__/data/static/;
|
||||
alias __DATA_DIR__/static/;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ userdoc = "https://docs.funkwhale.audio/users/index.html"
|
|||
code = "https://dev.funkwhale.audio/funkwhale/funkwhale"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.1.15"
|
||||
yunohost = ">= 11.1.16"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
|
@ -64,6 +64,7 @@ ram.runtime = "50M"
|
|||
[resources.install_dir]
|
||||
|
||||
[resources.data_dir]
|
||||
subdirs = "data"
|
||||
group = "www-data:rx"
|
||||
|
||||
[resources.permissions]
|
||||
|
|
|
@ -45,7 +45,6 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Creating a data directory..." --weight=1
|
||||
|
||||
mkdir -p $data_dir/data
|
||||
mkdir -p $data_dir/{static,media,music}
|
||||
|
||||
chmod 750 "$data_dir"
|
||||
|
|
|
@ -27,7 +27,6 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
|
|||
|
||||
ynh_restore_file --origin_path="$data_dir/" --not_mandatory
|
||||
|
||||
mkdir -p $data_dir/data
|
||||
mkdir -p $data_dir/{static,media,music}
|
||||
|
||||
chmod 750 "$data_dir/"
|
||||
|
|
|
@ -75,9 +75,9 @@ if [ -z "$data_dir/" ]; then
|
|||
ynh_secure_remove --file="$install_dir/import"
|
||||
ynh_secure_remove --file="$install_dir/code/data/music"
|
||||
|
||||
chmod 750 "$data_dir/data/"
|
||||
chmod -R o-rwx "$data_dir/data/"
|
||||
chown -R $app:www-data "$data_dir/data/"
|
||||
chmod 750 "$data_dir/"
|
||||
chmod -R o-rwx "$data_dir/"
|
||||
chown -R $app:www-data "$data_dir/"
|
||||
|
||||
upgrade_type="UPGRADE_APP"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue