Updating Signer on Docker
This page shows how to update an on-premises Signer instance that uses the lacunasoftware/signer image, in a container or in a Docker Swarm stack.
Before you update
- Check the installed version. Open
https://<your-domain>/api/system/info. TheproductVersionfield shows the version. - Read the changelog of every version between yours and the new one. Look for the versions marked as changing the database model.
- If you are moving from 2.x to 3.x, also read Updating to 3.x. The 3.x images already ship the ASP.NET Core Runtime 10.0.
- Update the staging environment first. Test sending and signing documents before you update production.
- Pick a low-usage time. On the first startup, the application updates the database when the new version changes the model.
Use the tag with the exact version, for example lacunasoftware/signer:3.0.0. The 3, stable and latest tags
move with each new version. With them, a container restart can bring a version you did not test.
If you run more than one container, only one of them must update the database. Scale down to one container before
you update. Alternatively, on every container but one, set General__AutoUpdateDatabase=false and
General__ProcessBackgroundJobs=false.
Backup
- Back up the database. With the default stack, the database lives in the
sqlvolume. With an external database, back it up in SQL Server. - Back up the files: the
filesvolume of the default stack or the configured Blob Storage. - Keep the encryption key (
signer_encryption_key) and the environment variables or thesigner.jsonfile.
See Persistent data.
Update a container
-
Pull the new version image:
docker image pull lacunasoftware/signer:3.0.0 -
Stop and remove the current container.
-
Run a new container with the new image and the same environment variables and volumes as the previous one.
Update on Docker Swarm
-
If the service has more than one replica, scale it down to one:
docker service scale signer_signer=1 -
In the
signer-stack.ymlfile, change the image tag of thesignerservice, for example tolacunasoftware/signer:3.0.0. -
Deploy the stack again:
docker stack deploy -c signer-stack.yml signer -
After the service starts, scale back to the number of replicas you used.
In the commands above, signer is the stack name. If you deployed with another name, change it in the commands.
Check the update
- Open
https://<your-domain>/api/system/infoand check thatproductVersionshows the new version. - Follow the log during the first startup. The database update can take a few minutes.
On Docker Swarm, run
docker service logs signer_signer -f. For a container, rundocker logs -f <container>.
If the container does not start and the log shows PKI SDK License was not loaded successfully, the application did
not load the PKI SDK license (missing, invalid or expired). Ask Lacuna for an updated license and set it in
PkiSuite__SdkLicense.
If something goes wrong
If the new version has a problem, contact Lacuna support first. If the new version applied database migrations, switching the image tag back is not enough. Follow the version rollback and use the previous version tag in the step that restores the binaries.