Hanami Docker Update Guide — ≥ 1.5.0 → 1.6.x
Scope • Upgrade an existing Hanami deployment running any version ≥ 1.5.0 to 1.6.x while preserving data, backups, and customised configuration.
0 · Before you start
Checkpoint | Action |
---|---|
Current version | Verify the running version (docker inspect --format='{{.Config.Image}}' ep-hanami-container ). |
Paired application URL | Confirm host & port where the paired application is reachable from Hanami. |
Sync credentials | Obtain username and password for the paired application REST sync endpoint. |
Maintenance window | Plan for ±30 min of downtime (container restart). |
Backups verified | Ensure recent backups exist in /opt/hanami-backups . |
1 · Download release 1.6.1
curl -u <user>:<password> -O \
https://nexus-direct.cogni.zone/repository/ep-hanami/zone/cogni/ep/hanami/ep-hanami/1.6.1/ep-hanami-1.6.1.zip
2 · Stop & remove the running container
sudo docker stop ep-hanami-container
sudo docker rm ep-hanami-container
(Only the container is removed; the old image ep-hanami:<old-version>
remains for rollback.)
3 · Extract artefact & load image
unzip ep-hanami-1.6.1.zip
4 · Load the Docker image
sudo docker load -i ep-hanami-1.6.1.tar
5 · Copy / update configuration
Backup the current
ext
,backups
,logs
directories (if any exists)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)Clean the directory (if it exists) (keep only environment‑specific YAMLs)
sudo find /opt/hanami-ext \( \
! -path "/opt/hanami-ext/config" \
! -path "/opt/hanami-ext/config/customer.yml" \
! -path "/opt/hanami-ext/config/customer-standalone.yml" \
! -path "/opt/hanami-ext/config/customer-workflow.yml" \
! -path "/opt/hanami-ext/config/security.yml" \
\) -type f -exec rm -f {} +
Environment‑specific YAMLs should stay:
/opt/hanami-ext/config/customer.yml
/opt/hanami-ext/config/customer-standalone.yml
/opt/hanami-ext/config/security.yml
- Copy the new defaults
sudo cp -r ./ext/* /opt/hanami-ext/
5.2 customer.yml — mandatory edits
No changes.
5.3 customer-standalone.yml (or any customer-<profile>.yml
)
No changes.
5.4 security.yml
No changes.
6 · Run the 1.6.1 container
Prepare folders if missing:
sudo mkdir -p /opt/hanami-ext
sudo mkdir -p /opt/hanami-backups
sudo mkdir -p /opt/hanami-logs
Run the container:
sudo docker run -d \
--name ep-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 \
ep-hanami:1.6.1 \
--spring.profiles.active=standalone,workflow
Profiles: ensure the list matches the
customer-<profile>.yml
files you keep.
7 · Watch the logs
sudo docker logs -f ep-hanami-container
Look for a successful startup message and indexing progress.
8 · Rollback (if needed)
sudo docker stop ep-hanami-container
sudo docker rm ep-hanami-container
# Relaunch the previous image (replace <old-version>)
sudo docker run -d --name ep-hanami-container ep-hanami:1.5.0
Restore the /opt/hanami-ext-backup-<date>
directory if config changes cause issues.