Wonach suchst Du?
What are you looking for?

Update to release version 5.175 using Docker (incl. required PostgreSQL database upgrade)

Overview

We upgraded our database since our release 5.174 from PostgreSQL version 9.5 to version 15.

In order to install the update packageRelease 5.175” (and future release versions, too), your database needs to be upgraded.

The following guide will help you perform both the database upgrade using the relevant scripts provided in the metasfresh-docker repository, specifically in the “extras” directory (see also instructions below), and the metasfresh update to the release version 5.175.

The main script executing the database upgrade (upgrade_postgres.sh) comprises the following actions:

Prerequisites

  1. Make sure that enough storage space is available to store a second database volume.
  2. Replace the Postgres password with your own (follow steps below).

Steps

Add new files and scripts to your directory

  1. Copy the folder “extras” from metasfresh-docker containing all needed docker-compose files and scripts.
  2. Paste the folder in the appropriate location in your directory in order to add all new files.
  3. Navigate to the “extras” directory.
     cd ./extras
    

Adjust the Postgres password

Adjust the Postgres password in the docker-compose files to match the Postgres password of your instance. To do so, please proceed as follows:

  1. Replace the POSTGRES_PASSWORD with your own in the following files in the “extras” directory:

Run the Upgrade

  1. Start the upgrade script (from the “extras” directory).
     nohup bash ./upgrade_postgres.sh
    
  2. Check log and wait for completion.
     tail -f nohup.out
    
  3. Add a new parameter shm_size: 256m to your database in the docker-compose.yml file.
  4. Change the Dockerfile versions of App, WebAPI, WebUI and DB to 5.175.
  5. Rebuild the images (from metasfresh-docker directory).
     # go back to metasfresh-docker
     cd ..
     docker-compose build --no-cache
    
Special Note:
If the upgrade fails the new database volume (newdb) will be removed and your instance with your original database (backup) can be restarted and used as usual. No data will be lost.
After resolving the conflicts, the upgrade process can be started anew.
Only after a successful upgrade, both the original and the new databases are renamed and indexed accordingly. The original database is retained as a backup.

Start the instance after successfull upgrade

  1. Start the upgraded instance with:
     docker-compose up -d
    

Voilà! Enjoy working with your updated version of metasfresh 5.175 under PostgreSQL 15

If you have any questions, you can contact us via our metasfresh Community Forum.


View source file on GitHub.com