diff --git a/changes/changelog.d/docker-installation-and-upgrade.doc b/changes/changelog.d/docker-installation-and-upgrade.doc new file mode 100644 index 000000000..e5cb86c80 --- /dev/null +++ b/changes/changelog.d/docker-installation-and-upgrade.doc @@ -0,0 +1 @@ +Simplify Docker mono-container installation and upgrade documentation diff --git a/docs/admin/upgrading.rst b/docs/admin/upgrading.rst index e69eb2de8..a908ba8dd 100644 --- a/docs/admin/upgrading.rst +++ b/docs/admin/upgrading.rst @@ -42,30 +42,19 @@ Mono-container installation Basically, you need to pull the new container image, stop and delete your existing container, and relaunch a new one: -.. parsed-literal:: - # this assumes you want to upgrade to version "|version|" - export FUNKWHALE_VERSION="|version|" +To upgrade your service, change the version number of the image in ``docker-compose.yml`` with the latest release (i.e. |version|). + +Pull the new images: .. code-block:: shell - docker pull funkwhale/all-in-one:$FUNKWHALE_VERSION - docker stop funkwhale - docker rm funkwhale - 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-compose pull -If you are not managing the container directly by hand, but use a third party tool such as Portainer, -instructions will vary, but, as a rule of thumb, pulling the new version of the image, and relaunch -a new container with the same arguments as the previous one (except for the image version) is enough. +Restart the service: + +.. code-block:: shell + + docker-compose up -d Multi-container installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/installation/docker.rst b/docs/installation/docker.rst index 08c531480..5686b4f1a 100644 --- a/docs/installation/docker.rst +++ b/docs/installation/docker.rst @@ -55,9 +55,7 @@ Log in as the newly created user from now on: Create ``.env`` file ~~~~~~~~~~~~~~~~~~~~ -Export the `version you want `_ to deploy (e.g., ``0.21``): - -Create an env file to store a few important configuration options: +Create a ``.env`` file to store a few important configuration options: .. code-block:: shell @@ -83,7 +81,9 @@ Create an env file to store a few important configuration options: Create ``docker-compose.yml`` file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. code-block:: yaml +Create a ``docker-compose.yml`` file to set up the containers: + +.. parsed-literal:: version: "3" services: @@ -105,6 +105,7 @@ Create ``docker-compose.yml`` file .. note:: + - The version can be changed (after ``funkwhale/all-in-one:``), `select the version `_ you want to deploy. - ``PUID`` and ``PGID`` are optional but useful to prevent permission issues with docker volumes - ``/path/to/your/music/dir`` should point to a path on your host where music you would like to import is located. You can safely remove the volume if you don't want to import music that way. @@ -129,12 +130,6 @@ Useful commands: Now, you just need to configure your :ref:`reverse-proxy `. Don't worry, it's quite easy. -.. note:: - - To upgrade your service, change the version number in ``docker-compose.yml`` and re-run ``docker-compose up -d``. - - Don't forget you might have manual changes to do when upgrading to a newer version. - .. _docker-multi-container: Multi-container installation