2017-07-17 20:00:32 +00:00
|
|
|
Systemd configuration
|
|
|
|
----------------------
|
|
|
|
|
2019-01-22 08:45:43 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
All the command lines below should be executed as root.
|
|
|
|
|
2018-07-01 09:33:55 +00:00
|
|
|
Systemd offers a convenient way to manage your Funkwhale instance if you're
|
2017-07-17 20:00:32 +00:00
|
|
|
not using docker.
|
|
|
|
|
2018-12-28 09:39:58 +00:00
|
|
|
We'll see how to setup systemd to properly start a Funkwhale instance.
|
2017-07-17 20:00:32 +00:00
|
|
|
|
|
|
|
First, download the sample unitfiles:
|
|
|
|
|
|
|
|
.. parsed-literal::
|
|
|
|
|
2018-12-10 15:00:33 +00:00
|
|
|
curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale.target"
|
|
|
|
curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-server.service"
|
|
|
|
curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-worker.service"
|
|
|
|
curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-beat.service"
|
2017-07-17 20:00:32 +00:00
|
|
|
|
|
|
|
This will download three unitfiles:
|
|
|
|
|
2018-07-01 09:33:55 +00:00
|
|
|
- ``funkwhale-server.service`` to launch the Funkwhale web server
|
|
|
|
- ``funkwhale-worker.service`` to launch the Funkwhale task worker
|
|
|
|
- ``funkwhale-beat.service`` to launch the Funkwhale task beat (this is for recurring tasks)
|
2017-07-17 20:00:32 +00:00
|
|
|
- ``funkwhale.target`` to easily stop and start all of the services at once
|
|
|
|
|
|
|
|
You can of course review and edit them to suit your deployment scenario
|
|
|
|
if needed, but the defaults should be fine.
|
|
|
|
|
|
|
|
Once the files are downloaded, reload systemd:
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
systemctl daemon-reload
|
|
|
|
|
|
|
|
And start the services:
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
systemctl start funkwhale.target
|
|
|
|
|
2018-12-20 22:37:16 +00:00
|
|
|
To ensure all Funkwhale processes are started automatically after a reboot, run:
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
systemctl enable funkwhale-server
|
|
|
|
systemctl enable funkwhale-worker
|
|
|
|
systemctl enable funkwhale-beat
|
|
|
|
|
2017-07-17 20:00:32 +00:00
|
|
|
You can check the statuses of all processes like this:
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
systemctl status funkwhale-\*
|