chore(docs): add systemd steps to Debian upgrade

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2423>
This commit is contained in:
Ciarán Ainsworth 2023-05-11 21:51:57 +02:00 committed by Marge
parent 19a1dde9b6
commit 6e04858b08
2 changed files with 26 additions and 14 deletions

View File

@ -0,0 +1 @@
Add systemd update instructions to Debian upgrade instructions (#1966)

View File

@ -6,20 +6,20 @@ If you installed Funkwhale following the [Debian guide](../installation/debian.m
1. Stop the Funkwhale services. 1. Stop the Funkwhale services.
```{code-block} sh ```console
sudo systemctl stop funkwhale.target # systemctl stop funkwhale.target
``` ```
2. Navigate to your Funkwhale directory. 2. Navigate to your Funkwhale directory.
```{code-block} sh ```console
cd /srv/funkwhale # cd /srv/funkwhale
``` ```
3. Remove the old files. 3. Remove the old files.
```{code-block} sh ```console
sudo rm -Rf api/* front/* venv # rm -Rf api/* front/* venv
``` ```
## Download Funkwhale ## 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. 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. 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 ## 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: 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. 1. Install or upgrade all OS dependencies using the dependencies script.
```{code-block} sh ```console
sudo api/install_os_dependencies.sh install # api/install_os_dependencies.sh install
``` ```
2. Collect the new static files to serve. 2. Collect the new static files to serve.
```{code-block} sh ```console
sudo venv/bin/funkwhale-manage collectstatic --no-input # venv/bin/funkwhale-manage collectstatic --no-input
``` ```
3. Apply new database migrations. 3. Apply new database migrations.
```{code-block} sh ```console
sudo -u funkwhale venv/bin/funkwhale-manage migrate # sudo -u funkwhale venv/bin/funkwhale-manage migrate
``` ```
4. Restart the Funkwhale services. 4. Restart the Funkwhale services.
```{code-block} sh ```console
sudo systemctl start funkwhale.target # 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. That's it! You've updated your Funkwhale pod. You should now see the new version running in your web browser.