1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-26 01:38:36 +00:00
mobilizon/docs/administration/upgrading.md
Thomas Citharel 9e3df495dc
Move configuration to traditional way
️ This is the way.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-02-06 16:12:13 +01:00

1.9 KiB
Raw Blame History

title
Upgrading to a new release

Preparing

The release page contains a changelog, and below it, upgrade instructions. Read and understand the release instructions.

Some tasks (like database migrations) can take a while, so we advise you to run commands inside a tmux or screen.

Backup

Always make sure your database and config folder are properly backuped before performing upgrades.

Unless stated otherwise in the release notes, the following steps are enough to upgrade Mobilizon.

Steps

Fetch latest code

Switch to the mobilizon user:

sudo -i -u mobilizon

And navigate to the Mobilizon root directory:

cd /home/mobilizon/live

Fetch the latest tags

git fetch --tags

And checkout the tag you want to switch to. For instance, if I want to upgrade to version v1.1:

git checkout v1.1

Fetch new dependencies

Fetch new and/or updated Elixir and NodeJS dependencies

mix deps.get
cd js
yarn install

Rebuild Mobilizon's front-end

yarn run build
cd ../

Recompile Mobilizon

MIX_ENV=prod mix compile

Let's switch back to your regular user.

Stop running Mobilizon processes

sudo systemctl stop mobilizon

Perform database migrations

Go back to the mobilizon user.

sudo -i -u mobilizon
cd live
MIX_ENV=prod mix ecto.migrate

Restart Mobilizon

Let's switch back one last time to your regular user.

sudo systemctl restart mobilizon

You can follow the Mobilizon logs to check that everything works properly.

sudo journalctl -u mobilizon -f

Thats all! Youre running the new version of Mobilizon now.

If you have issues after upgrading, try reviewing upgrade steps and release notes. Then feel free to contact us or file an issue on our Gitlab