Verified Commit 07f0f326 authored by Eliot Berriot's avatar Eliot Berriot 💬

Merge branch 'master' into develop

parents ef076232 ef6342f4
......@@ -100,8 +100,9 @@ you can create a symlink like this::
ln -s /media/mynfsshare /srv/funkwhale/data/music/nfsshare
And import music from this share with this command::
python api/manage.py import_files "/srv/funkwhale/data/music/nfsshare/**/*.ogg" --recursive --noinput --in-place
export LIBRARY_ID="<your_libary_id>"
python api/manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/**/*.ogg" --recursive --noinput --in-place
On docker setups, it will require a bit more work, because while the ``/srv/funkwhale/data/music`` is mounted
in containers, symlinked directories are not.
......
......@@ -164,7 +164,7 @@ match what is described in :doc:`/installation/debian`:
# download more recent API files
sudo -u funkwhale curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api"
sudo -u funkwhale unzip "api-$FUNKWHALE_VERSION.zip" -d extracted
sudo -u funkwhale rm -rf api/ && mv extracted/api .
sudo -u funkwhale rm -rf api/ && sudo -u funkwhale mv extracted/api .
sudo -u funkwhale rm -rf extracted
# update os dependencies
......
#!/bin/bash -eux
# Building sphinx and swagger docs
python -m sphinx . $BUILD_PATH
TARGET_PATH="$BUILD_PATH/swagger" ./build_swagger.sh
python ./get-releases-json.py > $BUILD_PATH/releases.json
......@@ -59,10 +59,10 @@ The reverse proxy
Funkwhale's API server should never be exposed directly to the internet, as we require
a reverse proxy (Apache or Nginx) for performance and security reasons. The reverse proxy
will receive client HTTP requests, and:
will receive client HTTP or HTTPS requests, and:
- Proxy them to the API server
- Serve requested static files (Audio files, stylesheets, javascript, fonts...)
- Serve requested static files (audio files, stylesheets, javascript, fonts...)
The API server
--------------
......
import json
import subprocess
from distutils.version import StrictVersion
def get_versions():
output = subprocess.check_output(
["git", "tag", "-l", "--format=%(creatordate:iso-strict)|%(refname:short)"]
)
tags = []
for line in output.decode().splitlines():
try:
date, tag = line.split("|")
except (ValueError):
continue
if not date or not tag:
continue
tags.append({"id": tag, "date": date})
return sorted(tags, key=lambda tag: StrictVersion(tag["id"]), reverse=True)
def main():
versions = get_versions()
data = {"count": len(versions), "releases": versions}
print(json.dumps(data))
if __name__ == "__main__":
main()
......@@ -199,6 +199,7 @@ Download the sample environment file:
cp /srv/funkwhale/deploy/env.prod.sample /srv/funkwhale/config/.env
Generate a secret key for Django::
openssl rand -base64 45
......@@ -208,7 +209,8 @@ configuration options are mentioned at the top of the file.
.. code-block:: shell
nano /srv/funkwhale/api/.env
chmod 600 /srv/funkwhale/config/.env # reduce permissions on the .env file since it contains sensitive data
nano /srv/funkwhale/config/.env
Paste the secret key you generated earlier at the entry
``DJANGO_SECRET_KEY`` and populate the ``DATABASE_URL``
......
......@@ -52,10 +52,15 @@ Create an env file to store a few important configuration options:
touch .env
echo "FUNKWHALE_HOSTNAME=yourdomain.funkwhale" >> .env
echo "FUNKWHALE_PROTOCOL=https" >> .env # or http
echo "NGINX_MAX_BODY_SIZE=100M" >> .env
echo "FUNKWHALE_API_IP=127.0.0.1" >> .env
echo "FUNKWHALE_API_PORT=5000" >> .env # or the container port you want to expose on the host
echo "DJANGO_SECRET_KEY=$(openssl rand -hex 45)" >> .env # generate and store a secure secret key for your instance
# Remove this if you expose the container directly on ports 80/443
echo "NESTED_PROXY=1" >> .env
chmod 600 .env # reduce permissions on the .env file since it contains sensitive data
Then start the container:
.. code-block:: shell
......@@ -179,8 +184,10 @@ Create your env file:
curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/env.prod.sample"
sed -i "s/FUNKWHALE_VERSION=latest/FUNKWHALE_VERSION=$FUNKWHALE_VERSION/" .env
chmod 600 .env # reduce permissions on the .env file since it contains sensitive data
sudo nano .env
Ensure to edit it to match your needs (this file is heavily commented), in particular ``DJANGO_SECRET_KEY`` and ``FUNKWHALE_HOSTNAME``.
You should take a look at the `configuration reference <https://docs.funkwhale.audio/configuration.html#configuration-reference>`_ for more detailed information regarding each setting.
......
This diff is collapsed.
......@@ -2,10 +2,10 @@ Creating a Funkwhale Account
============================
Before you can start using Funkwhale, you will need to set up an account on an instance. While
some instances allow you to listen to public music anonymously, you will need to create account
some instances allow you to listen to public music anonymously, you will need to create an account
to benefit from the full Funkwhale experience.
A list of instances along with other useful information such as version and enabled features can be found
A list of instances along with other useful informations such as version and enabled features can be found
`here <https://network.funkwhale.audio/dashboards/d/overview/network-overview>`_. Servers marked with
"Open registrations" are available to sign up to.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment