2017-06-25 21:02:24 +00:00
Docker installation
====================
2018-07-01 09:33:55 +00:00
Docker is the easiest way to get a Funkwhale instance up and running.
2017-06-25 21:02:24 +00:00
2018-11-25 16:53:44 +00:00
First, ensure you have `Docker <https://docs.docker.com/engine/installation/> `_ and `docker-compose <https://docs.docker.com/compose/install/> `_ installed.
2017-06-25 21:02:24 +00:00
Download the sample docker-compose file:
2017-07-17 20:00:32 +00:00
.. parsed-literal ::
2017-06-25 21:02:24 +00:00
2018-11-25 16:53:44 +00:00
mkdir /srv/funkwhale
2017-06-25 21:02:24 +00:00
cd /srv/funkwhale
2018-08-31 17:21:46 +00:00
mkdir nginx
2018-12-10 15:00:33 +00:00
curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template"
curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf"
curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker-compose.yml"
2017-06-25 21:02:24 +00:00
2018-11-25 16:53:44 +00:00
At this point, the archticture of `` /srv/funkwhale `` should look like that:
::
.
├── docker-compose.yml
├── .env
└── nginx
├── funkwhale_proxy.conf
└── funkwhale.template
2017-06-25 21:02:24 +00:00
Create your env file:
2017-07-17 20:00:32 +00:00
.. parsed-literal ::
2017-06-25 21:02:24 +00:00
2018-03-22 13:18:55 +00:00
export FUNKWHALE_VERSION="|version|"
2018-12-10 15:00:33 +00:00
curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample"
2018-03-22 13:18:55 +00:00
sed -i "s/FUNKWHALE_VERSION=latest/FUNKWHALE_VERSION=$FUNKWHALE_VERSION/" .env
2018-11-25 16:53:44 +00:00
sudo nano .env
2017-06-25 21:02:24 +00:00
2018-11-25 16:53:44 +00:00
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.
2017-06-25 21:02:24 +00:00
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
2018-06-07 11:17:48 +00:00
.. warning ::
You may sometimes get the following warning while applying migrations::
"Your models have changes that are not yet reflected in a migration, and so won't be applied."
This is a warning, not an error, and it can be safely ignored.
Never run the `` makemigrations `` command yourself.
2017-06-25 21:02:24 +00:00
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
2017-06-28 18:30:52 +00:00
Now, you just need to configure your :ref: `reverse-proxy <reverse-proxy-setup>` . Don't worry, it's quite easy.
2017-06-25 21:33:19 +00:00
About music acquisition
-----------------------
If you want to :doc: `import music located on the server </importing-music>` , you can put it in the `` data/music `` directory and it will become readable by the importer.