Skip to content

Commit

Permalink
Create UPDATE.ubuntu.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanbaidan authored Jan 10, 2025
1 parent 15138a0 commit c2642e9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions INSTALL/UPDATE.ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Version update guide for any Ubuntu version (for the release based installation).
=================================================================================
## The update guide is only applicable for the release based installation of the Monarc FrontOffice.
Means based on the installation steps described here:
https://github.com/monarc-project/MonarcAppFO/blob/master/INSTALL/INSTALL.ubuntu2204.md#2-installation-of-monarc

## It is recommended to perform database or server backup / snapshot before starting the update process.

## The upgrade process is the following:

```bash
PATH_TO_MONARC='/var/lib/monarc/fo'
PATH_TO_MONARC_DATA='/var/lib/monarc/fo-data'
MONARC_VERSION=$(curl --silent -H 'Content-Type: application/json' https://api.github.com/repos/monarc-project/MonarcAppFO/releases/latest | jq -r '.tag_name')
MONARCFO_RELEASE_URL="https://github.com/monarc-project/MonarcAppFO/releases/download/$MONARC_VERSION/MonarcAppFO-$MONARC_VERSION.tar.gz"

# Download a new release:
curl -sL $MONARCFO_RELEASE_URL -o /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL`
# Create the new release directory:
mkdir /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL | sed 's/.tar.gz//'`
# Unarchive the release:
tar -xzf /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL` -C /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL | sed 's/.tar.gz//'`
# Update the release symlink:
ln -sfn /var/lib/monarc/releases/`basename $MONARCFO_RELEASE_URL | sed 's/.tar.gz//'` $PATH_TO_MONARC
# Migrate the DB:
cd $PATH_TO_MONARC; ./scripts/upgrade-db.sh
# Cleanup the cache directories:
rm -rf $PATH_TO_MONARC_DATA/data/cache/* $PATH_TO_MONARC_DATA/data/DoctrineORMModule/Proxy/* $PATH_TO_MONARC_DATA/data/LazyServices/Proxy/*

# Finally restart the apache service:
sudo service apache reload
```

0 comments on commit c2642e9

Please sign in to comment.