Added intructions to load new configuration in mono-container install
This commit is contained in:
parent
6d5a1c9352
commit
ac76657f7b
|
@ -25,11 +25,20 @@ Mono-container installation
|
||||||
|
|
||||||
First, ensure you have `Docker <https://docs.docker.com/engine/installation/>`_ installed.
|
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
|
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:
|
Export the version you want to deploy:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
@ -42,8 +51,8 @@ Create an env file to store a few important configuration options:
|
||||||
|
|
||||||
touch .env
|
touch .env
|
||||||
echo "FUNKWHALE_HOSTNAME=yourdomain.funkwhale" >> .env
|
echo "FUNKWHALE_HOSTNAME=yourdomain.funkwhale" >> .env
|
||||||
echo "FUNKWHALE_PROTOCOL=https" >> .env # or http
|
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 "DJANGO_SECRET_KEY=$(openssl rand -hex 45)" >> .env # generate and store a secure secret key for your instance
|
||||||
|
|
||||||
Then start the container:
|
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
|
- 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``
|
- 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:
|
.. _docker-multi-container:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue