Show / Hide Table of Contents
Edit on GitHub

Signer - Docker Swarm

To install an on-premises instance of Signer on Docker, follow the steps below. For other platforms, click here.

Download the compose file and the configuration file templates:

curl -O https://cdn.lacunasoftware.com/signer/docker/signer-stack.yml
curl -O https://cdn.lacunasoftware.com/signer/docker/signer.json
curl -O https://cdn.lacunasoftware.com/signer/docker/signer-proxy.conf

Generate the SQL password and store as a Docker secret:

openssl rand -base64 24 | docker secret create signer_sql_password -
Note

You can instead run echo 'mypass' | docker secret create signer_sql_password - to use a SQL password of your choice

Generate the encryption key and store as a Docker secret:

openssl rand -hex 32 | docker secret create signer_encryption_key -
Note

If migrating from a previous installation, make sure to use the previosly generated encryption key

Edit the Signer configuration file:

nano signer.json

Follow the instructions on the file to fill it out.

Tip

For instructions on specific configurations on the signer.json file, please refer to the Ubuntu setup instructions

Edit the Nginx configuration file:

nano signer-proxy.conf

Replace the server_name entry with your site domain.

Pull the images beforehand:

docker image pull mcr.microsoft.com/mssql/server:2019-latest
docker image pull lacunasoftware/signer:1.9
docker image pull nginx:1.16
Note

This step is not really necessary, as the images would be pulled automatically on the next command. However, it avoids transient errors during deployment since not every orchestrator honors the depends_on instructions.

Deploy the Signer stack:

docker stack deploy -c signer-stack.yml signer

Check the status of the deployment:

watch docker stack ps signer

Watch the column CURRENT STATE. Wait until all services are Running (this may take a few minutes for the signer_sql service).

Check the logs for the signer service:

docker service logs signer_signer -f

The expected output is similar to:

signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Signer entrypoint invoked
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Building connection string
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Assuming SQL_HOST = sql
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Assuming SQL_PORT = default port (1433)
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Assuming SQL_USER = SA
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Assuming SQL_DATABASE = Signer
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Connection string: "Data Source=sql;Initial Catalog=Signer;User ID=SA;Password=REDACTED"
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | Starting application
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | warn: Microsoft.EntityFrameworkCore.Model.Validation[30000]
signer_signer.1.y56lfxi6rn0i@ubuntu1804    |       No type was specified for the decimal column 'Value' on entity type 'Invoice'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values using 'HasColumnType()'.
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | warn: Microsoft.EntityFrameworkCore.Model.Validation[30000]
signer_signer.1.y56lfxi6rn0i@ubuntu1804    |       No type was specified for the decimal column 'BillingLimit' on entity type 'Subscription'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values using 'HasColumnType()'.
signer_signer.1.y56lfxi6rn0i@ubuntu1804    | info: Lacuna.Signer.Site.Startup.RecurringJobsInit[0]
signer_signer.1.y56lfxi6rn0i@ubuntu1804    |       Initializing recurring jobs
Note

During first the run of the stack you might see the error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. This is because the SQL Server service takes some time to become ready. The stack usually recovers from this automatically.

Test the dashboard (replace signer.patorum.com with your site domain):

curl -H "Host: signer.patorum.com" http://127.0.0.1/api/system/info

The expected output is similar to:

{"productName":"Lacuna.Signer.Site","productVersion":"1.x.x","timestamp":"..."}

If you have a valid SSL certificate for your site, follow the steps on Enabling SSL on Docker.

See also

  • Enabling SSL on Docker
  • Using an external database on Docker
  • Checking the system logs on Docker
  • Persistent data (backup considerations)
  • Using a stack with GrantID
Back to top Copyright © 2015-2020 Lacuna Software