Merge branch 'test-install-docs' into 'develop'
Test install docs for 0.18 See merge request funkwhale/funkwhale!551
This commit is contained in:
commit
924f44c661
|
@ -65,6 +65,7 @@ server {
|
|||
|
||||
location / {
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
client_max_body_size ${NGINX_MAX_BODY_SIZE};
|
||||
proxy_pass http://fw/;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ map $http_upgrade $connection_upgrade {
|
|||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name ${FUNKWHALE_HOSTNAME};
|
||||
|
||||
# TLS
|
||||
|
|
|
@ -13,22 +13,27 @@ dependencies. However, Funkwhale requires a
|
|||
:doc:`few external dependencies <./external_dependencies>` for which
|
||||
documentation is outside of this document scope.
|
||||
|
||||
Install utilities
|
||||
-----------------
|
||||
Install system dependencies
|
||||
---------------------------
|
||||
|
||||
You'll need a few utilities during this guide that are not always present by
|
||||
default on system. On Debian-like systems, you can install them using:
|
||||
On Debian-like systems, you can install them using:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo apt-get update
|
||||
# Install dependencies
|
||||
sudo apt-get install curl python3-pip python3-venv git unzip libldap2-dev libsasl2-dev
|
||||
# Funkwhale dependencies
|
||||
sudo apt install build-essential ffmpeg libjpeg-dev libmagic-dev libpq-dev postgresql-client python3-dev
|
||||
|
||||
On Arch Linux and its derivatives:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# Install dependencies
|
||||
sudo pacman -S curl python-pip python-virtualenv git unzip
|
||||
# Funkwhale dependencies
|
||||
sudo pacman -S curl file ffmpeg libjpeg-turbo libpqxx python libldap libsasl
|
||||
|
||||
Layout
|
||||
-------
|
||||
|
@ -130,24 +135,6 @@ Then we'll download the frontend files:
|
|||
You can leave the ZIP archives in the directory, this will help you know
|
||||
which version you've installed next time you want to upgrade your installation.
|
||||
|
||||
System dependencies
|
||||
-------------------
|
||||
|
||||
A few OS packages are required in order to run Funkwhale. On Debian-like
|
||||
systems, they can be installed with
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo apt install build-essential ffmpeg libjpeg-dev libmagic-dev libpq-dev postgresql-client python3-dev
|
||||
|
||||
On Arch, run
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
pacman -S $(cat api/requirements.pac)
|
||||
|
||||
From now on, you should use the funkwhale user for all commands.
|
||||
|
||||
Python dependencies
|
||||
--------------------
|
||||
|
||||
|
@ -205,9 +192,6 @@ Download the sample environment file:
|
|||
.. parsed-literal::
|
||||
|
||||
curl -L -o config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/env.prod.sample"
|
||||
# symlink it so it's sourced automatically by the API process
|
||||
# (This won't be needed anymore once release 0.18 is out)
|
||||
ln -s /srv/funkwhale/config/.env /srv/funkwhale/api/.env
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -215,9 +199,8 @@ Download the sample environment file:
|
|||
|
||||
cp /srv/funkwhale/deploy/env.prod.sample /srv/funkwhale/config/.env
|
||||
|
||||
Generate a secret key for Django:
|
||||
Generate a secret key for Django::
|
||||
|
||||
.. code-block:: shell
|
||||
openssl rand -base64 45
|
||||
|
||||
You can then edit the file: the file is heavily commented, and the most relevant
|
||||
|
|
|
@ -25,11 +25,20 @@ Mono-container installation
|
|||
|
||||
First, ensure you have `Docker <https://docs.docker.com/engine/installation/>`_ installed.
|
||||
|
||||
Then set up a directory for your data::
|
||||
Create the user and the directory:
|
||||
|
||||
mkdir /srv/funkwhale
|
||||
.. code-block:: shell
|
||||
|
||||
sudo useradd -r -s /usr/bin/nologin -d /srv/funkwhale -m funkwhale
|
||||
sudo adduser funkwhale docker
|
||||
cd /srv/funkwhale
|
||||
|
||||
Log in as the newly created user from now on:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo -u funkwhale -H bash
|
||||
|
||||
Export the version you want to deploy:
|
||||
|
||||
.. parsed-literal::
|
||||
|
@ -42,8 +51,8 @@ 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 "DJANGO_SECRET_KEY=$(openssl rand -hex 45)" >> .env # generate and store a secure secret key for your instance
|
||||
echo "FUNKWHALE_PROTOCOL=https" >> .env # or http
|
||||
echo "DJANGO_SECRET_KEY=$(openssl rand -hex 45)" >> .env # generate and store a secure secret key for your instance
|
||||
|
||||
Then start the container:
|
||||
|
||||
|
@ -76,8 +85,32 @@ Useful commands:
|
|||
- You can start and stop your instance using ``docker start funkwhale`` and ``docker stop funkwhale``, respectively
|
||||
- To have a better idea of the resource usage of your instance (CPU, memory), run ``docker stats funkwhale``
|
||||
|
||||
.. note::
|
||||
|
||||
The container will not pick up changes made in .env file automatically.
|
||||
In order to load new configuration, run:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
export FUNKWHALE_VERSION="|version|"
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# stop and remove the existing container
|
||||
docker stop funkwhale
|
||||
docker rm funkwhale
|
||||
# relaunch a new container
|
||||
docker run \
|
||||
--name=funkwhale \
|
||||
--restart=unless-stopped \
|
||||
--env-file=/srv/funkwhale/.env \
|
||||
-v /srv/funkwhale/data:/data \
|
||||
-v /path/to/your/music/dir:/music:ro \
|
||||
-e PUID=$UID \
|
||||
-e PGID=$GID \
|
||||
-p 5000:80 \
|
||||
-d \
|
||||
funkwhale/all-in-one:$FUNKWHALE_VERSION
|
||||
|
||||
.. _docker-multi-container:
|
||||
|
||||
|
@ -86,6 +119,12 @@ Multi-container installation
|
|||
|
||||
First, ensure you have `Docker <https://docs.docker.com/engine/installation/>`_ and `docker-compose <https://docs.docker.com/compose/install/>`_ installed.
|
||||
|
||||
Export the version you want to deploy:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
export FUNKWHALE_VERSION="|version|"
|
||||
|
||||
Download the sample docker-compose file:
|
||||
|
||||
.. parsed-literal::
|
||||
|
@ -93,9 +132,9 @@ Download the sample docker-compose file:
|
|||
mkdir /srv/funkwhale
|
||||
cd /srv/funkwhale
|
||||
mkdir nginx
|
||||
curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker.nginx.template"
|
||||
curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf"
|
||||
curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker-compose.yml"
|
||||
curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker.nginx.template"
|
||||
curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
|
||||
curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker-compose.yml"
|
||||
|
||||
At this point, the architecture of ``/srv/funkwhale`` should look like that:
|
||||
|
||||
|
@ -103,7 +142,6 @@ At this point, the architecture of ``/srv/funkwhale`` should look like that:
|
|||
|
||||
.
|
||||
├── docker-compose.yml
|
||||
├── .env
|
||||
└── nginx
|
||||
├── funkwhale_proxy.conf
|
||||
└── funkwhale.template
|
||||
|
@ -112,8 +150,7 @@ Create your env file:
|
|||
|
||||
.. parsed-literal::
|
||||
|
||||
export FUNKWHALE_VERSION="|version|"
|
||||
curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/env.prod.sample"
|
||||
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
|
||||
sudo nano .env
|
||||
|
||||
|
|
|
@ -149,11 +149,14 @@ match the application configuration and make upgrade/maintenance easier.
|
|||
|
||||
On docker deployments, run the following commands:
|
||||
|
||||
.. code:: shell
|
||||
.. parsed-literal::
|
||||
|
||||
export FUNKWHALE_VERSION="|version|"
|
||||
# download the needed files
|
||||
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf"
|
||||
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker.proxy.template"
|
||||
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
|
||||
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker.proxy.template"
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# create a final nginx configuration using the template based on your environment
|
||||
set -a && source /srv/funkwhale/.env && set +a
|
||||
|
@ -165,11 +168,16 @@ On docker deployments, run the following commands:
|
|||
|
||||
On non-docker deployments, run the following commands:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
export FUNKWHALE_VERSION="|version|"
|
||||
|
||||
# download the needed files
|
||||
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf"
|
||||
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/nginx.template"
|
||||
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
|
||||
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/nginx.template"
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# create a final nginx configuration using the template based on your environment
|
||||
set -a && source /srv/funkwhale/config/.env && set +a
|
||||
|
|
Loading…
Reference in New Issue