Unified repository for both the API and the front-end
Go to file
Eliot Berriot 510844f31c
Merge tag '0.17' into develop
0.17 (2018-10-07)
-----------------

Per user libraries
^^^^^^^^^^^^^^^^^^

This release contains a big change in music management. This has a lot of impact
on how Funkwhale behaves, and you should have a look at
https://docs.funkwhale.audio/upgrading/0.17.html for information
about what changed and how to migrate.

Features:

- Per user libraries (#463, also fixes #160 and #147)
- Authentication using a LDAP directory (#194)

Enhancements:

- Add configuration option to set Musicbrainz hostname
- Add sign up link in the sidebar (#408)
- Added a library widget to display libraries associated with a track, album
  and artist (#551)
- Ensure from_activity field is not required in django's admin (#546)
- Move setting link from profile page to the sidebar (#406)
- Simplified and less error-prone nginx setup (#358)

Bugfixes:

- Do not restart current song when rordering queue, deleting tracks from queue
  or adding tracks to queue (#464)
- Fix broken icons in playlist editor (#515)
- Fixed a few untranslated strings (#559)
- Fixed splitted album when importing from federation (#346)
- Fixed toggle mute in volume bar does not restore previous volume level (#514)
- Fixed wrong env file URL and display bugs in deployment documentation (#520)
- Fixed wrong title in PlayButton (#435)
- Remove transparency on artist page button (#517)
- Set sane width default for ui cards and center play button (#530)
- Updated wrong icon and copy in play button dropdown (#436)

Documentation:

- Fixed wrong URLs for docker / nginx files in documentation (#537)

Other:

- Added a merge request template and more documentation about the changelog

Using a LDAP directory to authenticate to your Funkwhale instance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Funkwhale now support LDAP as an authentication source: you can configure
your instance to delegate login to a LDAP directory, which is especially
useful when you have an existing directory and don't want to manage users
manually.

You can use this authentication backend side by side with the classic one.

Have a look at https://docs.funkwhale.audio/installation/ldap.html
for detailed instructions on how to set this up.

Simplified nginx setup [Docker: Manual action required]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We've received a lot of user feedback regarding our installation process,
and it seems the proxy part is the one which is the most confusing and difficult.
Unfortunately, this is also the one where errors and mistakes can completely break
the application.

To make things easier for everyone, we now offer a simplified deployment
process for the reverse proxy part. This will make upgrade of the proxy configuration
significantly easier on docker deployments.

On non-docker instances, you have nothing to do.

If you have a dockerized instance, here is the upgrade path.

First, tweak your .env file::

    # remove the FUNKWHALE_URL variable
    # and add the next variables
    FUNKWHALE_HOSTNAME=yourdomain.funkwhale
    FUNKWHALE_PROTOCOL=https

    # add the following variable, matching the path your app is deployed
    # leaving the default should work fine if you deployed using the same
    # paths as the documentation
    FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/front/dist

Then, add the following block at the end of your docker-compose.yml file::

    # existing services
    api:
        ...
    celeryworker:
        ...

    # new service
    nginx:
      image: nginx
      env_file:
        - .env
      environment:
        # Override those variables in your .env file if needed
        - "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-30M}"
      volumes:
        - "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
        - "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
        - "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:ro"
        - "${MEDIA_ROOT}:${MEDIA_ROOT}:ro"
        - "${STATIC_ROOT}:${STATIC_ROOT}:ro"
        - "${FUNKWHALE_FRONTEND_PATH}:/frontend:ro"
      ports:
        # override those variables in your .env file if needed
        - "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
      command: >
          sh -c "envsubst \"`env | awk -F = '{printf \" $$%s\", $$1}'`\"
          < /etc/nginx/conf.d/funkwhale.template
          > /etc/nginx/conf.d/default.conf
          && cat /etc/nginx/conf.d/default.conf
          && nginx -g 'daemon off;'"
      links:
        - api

By doing that, you'll enable a dockerized nginx that will automatically be
configured to serve your Funkwhale instance.

Download the required configuration files for the nginx container:

.. parsed-literal::

    cd /srv/funkwhale
    mkdir nginx
    curl -L -o nginx/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/docker.nginx.template"
    curl -L -o nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"

Update the funkwhale.conf configuration of your server's reverse-proxy::

    # the file should match something like that, upgrade all variables
    # between ${} to match the ones in your .env file,
    # and your SSL configuration if you're not using let's encrypt
    # The important thing is that you only have a single location block
    # that proxies everything to your dockerized nginx.

    sudo nano /etc/nginx/sites-enabled/funkwhale.conf
    upstream fw {
        # depending on your setup, you may want to update this
        server ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT};
    }
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }

    server {
        listen 80;
        listen [::]:80;
        server_name ${FUNKWHALE_HOSTNAME};
        location / { return 301 https://$host$request_uri; }
    }
    server {
        listen      443 ssl;
        listen [::]:443 ssl;
        server_name ${FUNKWHALE_HOSTNAME};

        # TLS
        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/${FUNKWHALE_HOSTNAME}/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/${FUNKWHALE_HOSTNAME}/privkey.pem;

        # HSTS
        add_header Strict-Transport-Security "max-age=31536000";

        location / {
            include /etc/nginx/funkwhale_proxy.conf;
            proxy_pass   http://fw/;
        }
    }

Check that your configuration is valid then reload:

    sudo nginx -t
    sudo systemctl reload nginx
2018-10-07 11:53:52 +02:00
.gitlab Added a merge request template and more documentation about the changelog 2018-08-31 19:47:50 +02:00
api Version bump and release for 0.17 2018-10-07 11:53:09 +02:00
changes Version bump and release for 0.17 2018-10-07 11:53:09 +02:00
demo Minor fixes 2018-09-25 22:52:09 +02:00
deploy Fix typo 2018-09-13 15:31:06 +00:00
docker Fixed broken nginx conf for federation 2018-09-25 23:34:26 +02:00
docs Merge branch '549-music-federation-documentation' into 'develop' 2018-10-07 09:06:21 +00:00
front Translations integration 2018-10-07 09:20:10 +00:00
scripts Added script to remove unused artifacts from repository 2018-07-21 22:28:37 +02:00
.dockerignore Initial commit that merge both the front end and the API in the same repository 2017-06-23 23:00:42 +02:00
.editorconfig Initial commit that merge both the front end and the API in the same repository 2017-06-23 23:00:42 +02:00
.env.dev Implement LDAP authentication 2018-08-22 18:10:39 +00:00
.gitattributes Initial commit that merge both the front end and the API in the same repository 2017-06-23 23:00:42 +02:00
.gitignore Fixed #487: typos in scheduled tasks configuration 2018-08-19 16:25:42 +02:00
.gitlab-ci.yml Implement LDAP authentication 2018-08-22 18:10:39 +00:00
CHANGELOG Version bump and release for 0.17 2018-10-07 11:53:09 +02:00
CONTRIBUTING.rst Audio federation 2018-09-22 12:29:30 +00:00
CONTRIBUTORS.txt Initial commit that merge both the front end and the API in the same repository 2017-06-23 23:00:42 +02:00
LICENSE Fix #280: AGPL-3 licence 🎉 2018-06-06 22:37:55 +02:00
README.rst Rename CONTRIBUTING to CONTRIBUTING.rst for Gitlab formatting preview. 2018-07-29 10:11:20 +02:00
TRANSLATORS.rst See #161: added initial translating guidelines 2018-06-30 12:46:23 +02:00
dev.yml Import trust source 2018-09-23 12:38:42 +00:00
pyproject.toml Adding arabic translation 2018-07-04 16:31:29 +00:00

README.rst

Funkwhale
=============

.. image:: ./front/src/assets/logo/logo-full-500.png
  :alt: Funkwhale logo
  :target: https://funkwhale.audio

A self-hosted tribute to Grooveshark.com.

LICENSE: AGPL3

Getting help
------------

We offer various Matrix.org rooms to discuss about Funkwhale:

- `#funkwhale:matrix.org <https://matrix.to/#/#funkwhale:matrix.org>`_ for general questions about funkwhale
- `#funkwhale-dev:matrix.org <https://matrix.to/#/#funkwhale-dev:matrix.org>`_ for development-focused discussion

Please join those rooms if you have any questions!

You can also contact `@funkwhale@mastodon.eliotberriot.com <https://mastodon.eliotberriot.com/@funkwhale>`_ on the fediverse.


Contribute
----------

Contribution guidelines as well as development installation instructions
are outlined in `CONTRIBUTING <CONTRIBUTING.rst>`_.

Translate
^^^^^^^^^

Translators willing to help can refer to `TRANSLATORS <TRANSLATORS>`_ for instructions.