From 6e04858b08e3f852899667115cf2da94d7c15735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 11 May 2023 21:51:57 +0200 Subject: [PATCH] chore(docs): add systemd steps to Debian upgrade Part-of: --- changes/changelog.d/1966.doc | 1 + docs/administrator/upgrade/debian.md | 39 ++++++++++++++++++---------- 2 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 changes/changelog.d/1966.doc diff --git a/changes/changelog.d/1966.doc b/changes/changelog.d/1966.doc new file mode 100644 index 000000000..f295d69fd --- /dev/null +++ b/changes/changelog.d/1966.doc @@ -0,0 +1 @@ +Add systemd update instructions to Debian upgrade instructions (#1966) diff --git a/docs/administrator/upgrade/debian.md b/docs/administrator/upgrade/debian.md index 68e295f11..7daeac524 100644 --- a/docs/administrator/upgrade/debian.md +++ b/docs/administrator/upgrade/debian.md @@ -6,20 +6,20 @@ If you installed Funkwhale following the [Debian guide](../installation/debian.m 1. Stop the Funkwhale services. - ```{code-block} sh - sudo systemctl stop funkwhale.target + ```console + # systemctl stop funkwhale.target ``` 2. Navigate to your Funkwhale directory. - ```{code-block} sh - cd /srv/funkwhale + ```console + # cd /srv/funkwhale ``` 3. Remove the old files. - ```{code-block} sh - sudo rm -Rf api/* front/* venv + ```console + # rm -Rf api/* front/* venv ``` ## Download Funkwhale @@ -33,6 +33,17 @@ If you installed Funkwhale following the [Debian guide](../installation/debian.m 2. Follow the [Download Funkwhale](../installation/debian.md#3-download-funkwhale) instructions in the installation guide. 3. Follow the [Install the Funkwhale API](../installation/debian.md#4-install-the-funkwhale-api) instructions in the installation guide. +## Upgrade your systemd unit files + +To make sure you receive any updates made to unit files, download the latest versions from the repo. + +```console +# curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale.target" +# curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-server.service" +# curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-worker.service" +# curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-beat.service" +``` + ## Update your reverse proxy configuration To ensure your reverse proxy is up-to-date with changes, you should regenerate your Nginx configuration with each upgrade. To do this: @@ -54,26 +65,26 @@ Once you have downloaded the new files, you can update your Funkwhale instance. 1. Install or upgrade all OS dependencies using the dependencies script. - ```{code-block} sh - sudo api/install_os_dependencies.sh install + ```console + # api/install_os_dependencies.sh install ``` 2. Collect the new static files to serve. - ```{code-block} sh - sudo venv/bin/funkwhale-manage collectstatic --no-input + ```console + # venv/bin/funkwhale-manage collectstatic --no-input ``` 3. Apply new database migrations. - ```{code-block} sh - sudo -u funkwhale venv/bin/funkwhale-manage migrate + ```console + # sudo -u funkwhale venv/bin/funkwhale-manage migrate ``` 4. Restart the Funkwhale services. - ```{code-block} sh - sudo systemctl start funkwhale.target + ```console + # systemctl start funkwhale.target ``` That's it! You've updated your Funkwhale pod. You should now see the new version running in your web browser.