Migration 0.17 --> 0.18.2

support

#1

Hello and thanks for this project :slightly_smiling_face:

I had some difficulties for the migration 0.17 to 0.18 on a debian stretch system (no docker): I followed documentation

  • I had the error :“django-versatileimagefield 1.9 has requirement Pillow<=5.0.0,>=2.4.0, but you’ll have pillow 5.4.1 which is incompatible.” while executing pip install -r api/requirements.txt. I see that un docker version Pillow was in version 4.3.0 si I have forced installation of version 4.3.0 of Pillow (pip install Pillow==4.3.0)

  • When I try to log in in my funkwhale instance I had a blank page , I have updated /etc/nginx/site-available/funkwhale.conf by adding:
    location /front/ {
    alias /srv/funkwhale/front/dist/;
    }
    as described in the changelog in the section: 0.18 “Naomi”

And now all is OK

Perhaps can you include this instruction in the upgarde documentation.

Thanks


#2

Hi @gwalarn.

Can you share your nginx configuration ?

You need to have

location / {
    include /etc/nginx/funkwhale_proxy.conf;
    # this is needed if you have file import via upload enabled
    client_max_body_size ${NGINX_MAX_BODY_SIZE};
    proxy_pass   http://funkwhale-api/;
}

location /front/ {
    alias ${FUNKWHALE_FRONTEND_PATH}/;
}

in your conf.

Based on your post, you only added:

location /front/ {
    alias /srv/funkwhale/front/dist/;
}

#3

Yes I only add the definition of /front/ to not have a blank page (I also add the description of compression for security reason,)
$ diff funkwhale.conf.0.17 funkwhale.conf
45a46,73

# introduit avec la version 0.18.1 (security)
# compression settings
gzip on;
gzip_comp_level    5;
gzip_min_length    256;
gzip_proxied       any;
gzip_vary          on;

gzip_types
    application/javascript
    application/vnd.geo+json
    application/vnd.ms-fontobject
    application/x-font-ttf
    application/x-web-app-manifest+json
    font/opentype
    image/bmp
    image/svg+xml
    image/x-icon
    text/cache-manifest
    text/css
    text/plain
    text/vcard
    text/vnd.rim.location.xloc
    text/vtt
    text/x-component
    text/x-cross-domain-policy;

101a130,133

}

location /front/ {

alias /srv/funkwhale/fr

and the complete configuration file:

 # This file was generated from funkwhale.template

upstream funkwhale-api {
    # depending on your setup, you may want to update this
    server 127.0.0.1:5000;
}

#server {
#    listen 80;
#    listen [::]:80;
#    # update this to match your instance name
#    server_name MY_FUNKWHALE_DOMAIN;
#    # useful for Let's Encrypt
#    location /.well-known/acme-challenge/ { allow all; }
#    location / { return 301 https://$host$request_uri; }
#}

# required for websocket support
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
#    listen      443 ssl http2;
#    listen [::]:443 ssl http2;
    listen      80;
    listen [::]:80;
    server_name MY_FUNKWHALE_DOMAIN;

#    # TLS
#    # Feel free to use your own configuration for SSL here or simply remove the
#    # lines and move the configuration to the previous server block if you
#    # don't want to run funkwhale behind https (this is not recommended)
#    # have a look here for let's encrypt configuration:
#    # https://certbot.eff.org/all-instructions/#debian-9-stretch-nginx
#    ssl_protocols TLSv1.2;
#    ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
#    ssl_prefer_server_ciphers on;
#    ssl_session_cache shared:SSL:10m;
#    ssl_certificate     /etc/letsencrypt/live/MY_FUNKWHALE_DOMAIN/fullchain.pem;
#    ssl_certificate_key /etc/letsencrypt/live/MY_FUNKWHALE_DOMAIN/privkey.pem;
#    # HSTS
#    add_header Strict-Transport-Security "max-age=31536000";

    # introduit avec la version 0.18.1 (security)
    # compression settings
    gzip on;
    gzip_comp_level    5;
    gzip_min_length    256;
    gzip_proxied       any;
    gzip_vary          on;

    gzip_types
        application/javascript
        application/vnd.geo+json
        application/vnd.ms-fontobject
        application/x-font-ttf
        application/x-web-app-manifest+json
        font/opentype
        image/bmp
        image/svg+xml
        image/x-icon
        text/cache-manifest
        text/css
        text/plain
        text/vcard
        text/vnd.rim.location.xloc
        text/vtt
        text/x-component
        text/x-cross-domain-policy;


    root /srv/funkwhale/front/dist;

    location / {
        try_files $uri $uri/ @rewrites;
    }

    location @rewrites {
        rewrite ^(.+)$ /index.html last;
    }
    location /api/ {
        include /etc/nginx/funkwhale_proxy.conf;
        # this is needed if you have file import via upload enabled
        client_max_body_size 30M;
        proxy_pass   http://funkwhale-api/api/;
    }

    location /federation/ {
        include /etc/nginx/funkwhale_proxy.conf;
        proxy_pass   http://funkwhale-api/federation/;
    }

    # You can comment this if you do not plan to use the Subsonic API
    location /rest/ {
        include /etc/nginx/funkwhale_proxy.conf;
        proxy_pass   http://funkwhale-api/api/subsonic/rest/;
    }

    location /.well-known/ {
        include /etc/nginx/funkwhale_proxy.conf;
        proxy_pass   http://funkwhale-api/.well-known/;
    }

    location /media/ {
        alias /srv/funkwhale/data/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   /srv/funkwhale/data/media;
    }

    location /_protected/music {
        # this is an internal location that is used to serve
        # audio files once correct permission / authentication
        # has been checked on API side
        # Set this to the same value as your MUSIC_DIRECTORY_PATH setting
        internal;
        alias   /srv/funkwhale/data/music;
    }

    location /staticfiles/ {
        # django static files
        alias /srv/funkwhale/data/static/;
    }

    location /front/ {
	alias  /srv/funkwhale/front/dist/;
    }
}

#4

Hence the issue, you need to apply all the changes outlined in the changelog: https://docs.funkwhale.audio/changelog.html#iframe-widget-to-embed-public-tracks-and-albums-manual-action-required


closed #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.