Skip to main content

docker-incremental-update-1.8.x

0 · Before you start

CheckpointAction
Current versionVerify the running version (docker inspect --format='{{.Config.Image}}' hanami-container).
Maintenance windowPlan ±30 min downtime (container restart).

1 · Download release 1.8.0

curl -u <user>:<password> -O \
<artifact repository url>/hanami-1.8.0.zip

2 · Stop & remove the running container

sudo docker stop hanami-container
sudo docker rm hanami-container

(Only the container is removed; the image hanami:<old> stays for rollback.)


3 · Extract artefact & load image

unzip hanami-1.8.0.zip
sudo docker load -i hanami-1.8.0.tar

4 · Back up all current data

sudo cp -r /opt/hanami-ext       /opt/hanami-ext-backup-$(date +%F)
sudo cp -r /opt/hanami-backups /opt/hanami-backups-backup-$(date +%F)
sudo cp -r /opt/hanami-logs /opt/hanami-logs-backup-$(date +%F)

5 · Replace the ext directory

  1. Delete the old directory completely

    sudo rm -rf /opt/hanami-ext

    All previous files are safe in /opt/hanami-ext-backup-$(date +%F) and will serve as reference when populating the new customer-env.yml.

  2. Copy the new defaults

    sudo mkdir -p /opt/hanami-ext
    sudo cp -r ./ext/* /opt/hanami-ext/

    Your fresh /opt/hanami-ext/config must contain exactly:

    customer-env.yml.example   ← template (do not edit in place)
    customer-iam.yml ← keep as‑is
    customer-workflow.yml ← keep as‑is
    customer.yml ← keep as‑is


6 · Create customer-env.yml (one per environment)

customer-env.yml.example is only a template. Copy it once per runtime environment (dev, prod …), fill in real values, then delete the example:

cp /opt/hanami-ext/config/customer-env.yml.example \
/opt/hanami-ext/config/customer-env.yml

Replace every placeholder with the value that previously lived in the old files:

New keyWhere it lived before (1.6.x)
env.hanami.elasticsearch.*customer-standalone.yml: env.hanami.elasticsearch.*
env.hanami.triplestore.*customer-standalone.yml: hanami.customer.template-arguments.*
env.hanami.catalogue.urlcustomer-standalone.yml: hanami.sync.catalogue.baseUrl
env.hanami.security.issuer-urisecurity.yml: spring.security.oauth2.client.provider.*.issuer-uri
env.hanami.security.client-id/secretsecurity.yml: spring.security.oauth2.client.registration.*
env.hanami.security.iamset true to switch to external IAM

7 · Update Front-End settings

Please use this instruction to update Front-End configuration per environment: UI Assets Overrides


8 · Run the 1.8.0 container

Without external IAM / OAuth2 (default)

sudo docker run -d \
--name hanami-container \
--network host \
--restart unless-stopped \
-v /opt/hanami-ext:/opt/hanami/ext \
-v /opt/hanami-backups:/opt/hanami/backups \
-v /opt/hanami-logs:/opt/hanami/logs \
-e JAVA_TOOL_OPTIONS="-Xms6g -Xmx6g" \
hanami:1.8.0 \
--spring.profiles.active=workflow,env

With external IAM / OAuth2

sudo docker run -d \
--name hanami-container \
--network host \
--restart unless-stopped \
-v /opt/hanami-ext:/opt/hanami/ext \
-v /opt/hanami-backups:/opt/hanami/backups \
-v /opt/hanami-logs:/opt/hanami/logs \
-e JAVA_TOOL_OPTIONS="-Xms6g -Xmx6g" \
hanami:1.8.0 \
--spring.profiles.active=workflow,env,iam

Profiles explained

ProfilePurposeFile loaded
workflowEnables all workflow componentscustomer-workflow.yml
envInjects the environment-specific variablescustomer-env.yml

9 · Watch the logs

sudo docker logs -f hanami-container

Confirm successful startup and workflow initialisation.


10 · Rollback (if needed)

sudo docker stop hanami-container
sudo docker rm hanami-container

# Relaunch previous image (replace <old-version>)
sudo docker run -d --name hanami-container hanami:<old-version>

Restore /opt/hanami-ext-backup-<date>.


🎉 Done!