Hey !
Goal
I’m trying to change the default upload directory of funkwhale.
Default directory is : /var/www/funkwhale
I want it to be /mnt/ddiyuno/funkwhale
Solution 1
Actions
I changed the env.prod with :
MEDIA_ROOT=/mnt/ddiyuno/funkwhale/media
MUSIC_DIRECTORY_PATH=/mnt/ddiyuno/funkwhale/import
I changed nginx.conf with :
location /media/ {
alias /mnt/ddiyuno/funkwhale/media/;
}
location /_protected/media/ {
# this is an internal location that is used to serve
# audio files once correct permission / authentication
# has been checked on API side
internal;
alias /mnt/ddiyuno/funkwhale/media/;
}
location /_protected/music/ {
internal;
alias /mnt/ddiyuno/funkwhale/import/;
}
I chown -R funlwhale /mnt/ddiyuno/funkwhale
I reboot
Problem
No effects, when I upload files, they still go in the default folder :s
Solution 2
Create a symlink ln -s /mnt/ddiyuno/funkwhale2/ /var/www/funkwhale
Problem
Seems like symlink aren’t supported because I have a error message of funkwhale-server service :
File “/var/www/funkwhale/code/virtualenv/lib/python3.5/site-packages/celery/utils/imports.py”, line 61, in cwd_in_path
cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory