Merge branch '265-user-upgrade' into 'develop'
Resolve "Upgrade doc" Closes #265 See merge request funkwhale/funkwhale!258
This commit is contained in:
commit
aaad2329ef
|
@ -0,0 +1 @@
|
||||||
|
Upgrade documentation now use the correct user on non-docker setups (#265)
|
|
@ -64,9 +64,9 @@ The following example assume your setup match :ref:`frontend-setup`.
|
||||||
# this assumes you want to upgrade to version "|version|"
|
# this assumes you want to upgrade to version "|version|"
|
||||||
export FUNKWHALE_VERSION="|version|"
|
export FUNKWHALE_VERSION="|version|"
|
||||||
cd /srv/funkwhale
|
cd /srv/funkwhale
|
||||||
curl -L -o front.zip "https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/$FUNKWHALE_VERSION/download?job=build_front"
|
sudo -u funkwhale curl -L -o front.zip "https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/$FUNKWHALE_VERSION/download?job=build_front"
|
||||||
unzip -o front.zip
|
sudo -u funkwhale unzip -o front.zip
|
||||||
rm front.zip
|
sudo -u funkwhale rm front.zip
|
||||||
|
|
||||||
Upgrading the API
|
Upgrading the API
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
@ -76,33 +76,33 @@ match what is described in :doc:`debian`:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
# stop the services
|
|
||||||
sudo systemctl stop funkwhale.target
|
|
||||||
|
|
||||||
# this assumes you want to upgrade to version "|version|"
|
# this assumes you want to upgrade to version "|version|"
|
||||||
export FUNKWALE_VERSION="|version|"
|
export FUNKWALE_VERSION="|version|"
|
||||||
cd /srv/funkwhale
|
cd /srv/funkwhale
|
||||||
|
|
||||||
# download more recent API files
|
# download more recent API files
|
||||||
curl -L -o "api-|version|.zip" "https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWALE_VERSION/download?job=build_api"
|
sudo -u funkwhale curl -L -o "api-|version|.zip" "https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWALE_VERSION/download?job=build_api"
|
||||||
unzip "api-$FUNKWALE_VERSION.zip" -d extracted
|
sudo -u funkwhale unzip "api-$FUNKWALE_VERSION.zip" -d extracted
|
||||||
rm -rf api/ && mv extracted/api .
|
sudo -u funkwhale rm -rf api/ && mv extracted/api .
|
||||||
rm -rf extracted
|
sudo -u funkwhale rm -rf extracted
|
||||||
|
|
||||||
# update os dependencies
|
# update os dependencies
|
||||||
sudo api/install_os_dependencies.sh install
|
sudo api/install_os_dependencies.sh install
|
||||||
# update python dependencies
|
# update python dependencies
|
||||||
source /srv/funkwhale/load_env
|
source /srv/funkwhale/load_env
|
||||||
source /srv/funkwhale/virtualenv/bin/activate
|
sudo -u funkwhale -E /srv/funkwhale/virtualenv/bin/pip install -r api/requirements.txt
|
||||||
pip install -r api/requirements.txt
|
|
||||||
|
# collect static files
|
||||||
|
sudo -u funkwhale -E /srv/funkwhale/virtualenv/bin/python api/manage.py collectstatic --no-input
|
||||||
|
|
||||||
|
# stop the services
|
||||||
|
sudo systemctl stop funkwhale.target
|
||||||
|
|
||||||
# apply database migrations
|
# apply database migrations
|
||||||
python api/manage.py migrate
|
sudo -u funkwhale -E /srv/funkwhale/virtualenv/bin/python api/manage.py migrate
|
||||||
# collect static files
|
|
||||||
python api/manage.py collectstatic --no-input
|
|
||||||
|
|
||||||
# restart the services
|
# restart the services
|
||||||
sudo systemctl restart funkwhale.target
|
sudo systemctl start funkwhale.target
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue