Pular para o conteúdo principal

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​

  1. Check the installed version. Open https://<your-domain>/api/system/info. The productVersion field shows the version.
  2. Read the changelog of every version between yours and the new one. Look for the versions marked as changing the database model.
  3. 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.
  4. Update the staging environment first. Test sending and signing documents before you update production.
  5. Pick a low-usage time. On the first startup, the application updates the database when the new version changes the model.
tip

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.

warning

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​

  1. Back up the database. With the default stack, the database lives in the sql volume. With an external database, back it up in SQL Server.
  2. Back up the files: the files volume of the default stack or the configured Blob Storage.
  3. Keep the encryption key (signer_encryption_key) and the environment variables or the signer.json file.

See Persistent data.

Update a container​

  1. Pull the new version image:

    docker image pull lacunasoftware/signer:3.0.0
  2. Stop and remove the current container.

  3. Run a new container with the new image and the same environment variables and volumes as the previous one.

Update on Docker Swarm​

  1. If the service has more than one replica, scale it down to one:

    docker service scale signer_signer=1
  2. In the signer-stack.yml file, change the image tag of the signer service, for example to lacunasoftware/signer:3.0.0.

  3. Deploy the stack again:

    docker stack deploy -c signer-stack.yml signer
  4. After the service starts, scale back to the number of replicas you used.

note

In the commands above, signer is the stack name. If you deployed with another name, change it in the commands.

Check the update​

  1. Open https://<your-domain>/api/system/info and check that productVersion shows the new version.
  2. 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, run docker 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.

See also​

View as Markdown