Docker setup is officialy documented! ❤️

merge-requests/154/head
Eliot Berriot 2017-06-25 23:02:24 +02:00
rodzic 5d7b1cb892
commit 9f264e3868
4 zmienionych plików z 159 dodań i 2 usunięć

44
docs/features.rst 100644
Wyświetl plik

@ -0,0 +1,44 @@
Features
=========
Scope
------
Funkwhale is a web based music server. It is similar in term of goals and feature set to various existing projects, such as `Sonerezh <https://www.sonerezh.bzh/>`_ or `Libresonic <https://libresonic.org/>`_.
A social platform
------------------
However, funkwhale is better-suited for small to medium communities and was designed to be not only a music server and player, but also a place to socialize around music and discover new content. While some of these features are not currently implemented, our roadmap includes:
- Radios, to discover the music of a given user, artist, genre...
- Playlists
- Favorites
- Broadcasts, as they existed in Grooveshark, for exemple
- Recommendations
Music acquisition
------------------
Funkwhale is not bundled with any music, and you'll have to import your own music in the platform using the bundled plugins.
At the moment, you can feed your existing music library to the server and, assuming it has the correct tags defined on the files, it will be imported seamlessly.
You can also import music directly from YouTube (other sources coming, thanks to `Youtube-dl <https://github.com/rg3/youtube-dl>`_). Downloading and publishing copyrighted content may be forbidden in your country, though.
Metadata
---------
In order to keep your library clean, browsable and aggregate relevant data about artists, albums and tracks, we fetch a lot of metadata from the `MusicBrainz project <http://musicbrainz.org/>`_.
Structure
---------
The project itself is splitted in two parts:
1. The backend, a REST API developped using Python3 and Django
2. The frontend, that consumes the API, built as a single page application with VueJS and Semantic UI
While the main interface to the server and API is the bundled front-end, the project itself is agnostic in the way you connect to it. Therefore, desktop clients or apps could be developped and implement the same (or even more) features as the bundled frontend.
This modularity also makes it possible do deploy only a single component from the system.

Wyświetl plik

@ -3,12 +3,16 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to funkwhale's documentation!
Funkwhale's documentation
=====================================
Funkwhale is a self-hosted, modern free and open-source music server, heavily inspired by Grooveshark.
.. toctree::
:maxdepth: 2
:caption: Contents:
features
installation/index

Wyświetl plik

@ -0,0 +1,49 @@
Docker installation
====================
Docker is the easiest way to get a funkwhale instance up and running.
First, ensure you have `Docker <https://docs.docker.com/engine/installation/>`_ and `docker-compose <https://github.com/docker/compose/releases>`_ installed.
Download the sample docker-compose file:
.. code-block:: bash
mkdir -p /srv/funkwhale
cd /srv/funkwhale
curl -L -o docker-compose.yml "https://code.eliotberriot.com/funkwhale/funkwhale/raw/master/deploy/docker-compose.yml"
Create your env file:
.. code-block:: bash
curl -L -o .env "https://code.eliotberriot.com/funkwhale/funkwhale/raw/master/deploy/env.prod.sample"
Ensure to edit it to match your needs (this file is heavily commented)
Then, you should be able to pull the required images:
.. code-block:: bash
docker-compose pull
Run the database container and the initial migrations:
.. code-block:: bash
docker-compose up -d postgres
docker-compose run --rm api python manage.py migrate
Create your admin user:
.. code-block:: bash
docker-compose run --rm api python manage.py createsuperuser
Then launch the whole thing:
.. code-block:: bash
docker-compose up -d
Now, you just need to setup the :ref:`frontend files <frontend-setup>`, and configure your :ref:`reverse-proxy <reverse-proxy-setup>`. Don't worry, it's quite easy.

Wyświetl plik

@ -0,0 +1,60 @@
Installation
=============
Project architecture
--------------------
The project relies on the following components and services to work:
- A web application server (Python/Django/Gunicorn)
- A PostgreSQL database to store application data
- A redis server to store cache and tasks data
- A celery worker to run asynchronouse tasks (such as music import)
- A celery scheduler to run recurrent tasks
Available installation methods
-------------------------------
.. toctree::
:maxdepth: 1
docker
.. _frontend-setup:
Frontend setup
---------------
Files for the web frontend are purely static and can simply be downloaded, unzipped and served from any webserver:
.. code-block:: bash
cd /srv/funkwhale
curl -L -o front.zip "https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/master/download?job=build_front"
unzip front.zip
.. _reverse-proxy-setup:
Reverse proxy
--------------
In order to make funkwhale accessible from outside your server and to play nicely with other applications on your machine, you should configure a reverse proxy. At the moment, we only have documentation for nginx, if you know how to implement the same thing for apache, you're welcome.
Nginx
^^^^^
Ensure you have a recent version of nginx on your server. On debian-like system, you would have to run the following:
.. code-block:: bash
apt-get update
apt-get install nginx
Then, download our sample virtualhost file:
.. code-block:: bash
curl -L -o /etc/nginx/sites-enabled/funkwhale.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/master/deploy/nginx.conf"
Ensure static assets and proxy pass match your configuration, and check the configuration is valid with ``nginx -t``. If everything is fine, you can restart your nginx server with ``service nginx restart``.