Live demo of agent247 on Digio's docs — click the orange button at the bottom right to start.

Document Signer – Docker Deployment Guide

This guide provides details to deploy and manage the Digio Document Signer server using Docker.


📦 Repository Overview

The Document Signer service runs inside a Docker container. It exposes signing endpoints and requires configuration, license files, and certificates mounted from the host machine.

Key Highlights:

  • Runs on linux/amd64 or linux/arm64 platforms
  • Uses tagged Docker images based on JDK version and platform
  • Externalized configuration for easier updates
  • Mounted volumes for config, resources, and logs

Available Docker image tags: https://hub.docker.com/r/digiotech/doc_signer/tags

TagPlatformJava Version
jdk21-amd64linux amd6421
jdk21-arm64linux arm6421
jdk17-amd64linux amd6417
jdk17-arm64linux arm6417

✅ Pre-requisites

Before running the service, ensure the following:

  • Docker (>= 20.10) installed on your system
  • docker-compose (>= 1.29) available
  • Host directories prepared with correct permissions:
    • /home/doc_signer/config → for application.yml
    • /home/doc_signer/resources → for license and keystore files
    • /home/doc_signer/logs → for log outputs

⚙️ Docker Compose Setup

Create a file named docker-compose.yml in your project root:

version: "3"
services:
  digio-doc-signer:
    platform: linux/amd64   # or linux/arm64
    image: digiotech/doc_signer:jdk17-amd64  # use tag based on platform & JDK
    container_name: digio-doc-signer
    ports:
      - "8181:8181"
    volumes:
      - /home/doc_signer/config:/digio_docsigner/config
      - /home/doc_signer/resources:/digio_docsigner/resources
      - /home/doc_signer/logs:/digio_docsigner/logs

Application Configuration (application.yml)

The application.yml file controls the runtime configuration of the Digio Document Signer. This file must be placed in the mapped config volume:

/digio_docsigner/config/application.yml


server:
  compression:
    enabled: true
  tomcat:
    accept-count: 50
    max-connections: 100
    connection-timeout: 30000
    basedir: digio_docsigner
    accesslog:
      enabled: true
      renameOnRotate: true
      file-date-format: .yyyy-MM-dd
      rotate: true
      max-days: 30
      directory: /digio_docsigner/logs
      prefix: access
      suffix: .log
    threads:
      max: 50
      min-spare: 5
  port: 8181
logging:
  pattern:
    console: "%highlight(%-5level) [%date] [%thread] [%cyan(%logger{0})]: %message%n"
    file: "%highlight(%-5level) [%date] [%thread] [%cyan(%logger{0})]: %message%n"
    dateformat: "yyyy-MM-dd HH:mm:ss.SSS ZZZZ"
  file:
    path: /digio_docsigner/logs/
    name: ${logging.file.path}production.log
spring:
  application:
    name: DigioSignServer
  data:
    rest:
      base-path: /
  jackson:
    property-naming-strategy: SNAKE_CASE
    default-property-inclusion: non_null
    time-zone: Asia/Kolkata
    date-format: "yyyy-MM-dd HH:mm:ss"
    mapper:
      accept-case-insensitive-enums: true
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB
  jpa:
    hibernate:
      ddl-auto: update
      naming:
        physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
  datasource:
    url: jdbc:h2:file:/digio_docsigner/logs/audit_db
    driver-class-name: org.h2.Driver
    username: root
    password: pass

license_path: /digio_docsigner/config/licence.digio
doc_signer:
  default-key-store: "test"
  prod-cert-checks: true
  key-stores:
    test:
      key-store-file: "/digio_docsigner/resources/testing.pfx"
      key-store-password: "12345678"
      key-store-alias: ""
  external-sign-config:
    init-endpoint: "https://api.digio.in/v2/client/document/external_init_sign"
    finish-endpoint: "https://api.digio.in/v2/client/document/external_submit_sign"
  authentication:
    client-id: "client_id"
    client-secret: "secret"
    token: "12345"
  • Runs on port 8181 (mapped in docker-compose.yml)
  • Enables response compression
  • Configures Tomcat connection/thread pool

Logging

logging:
  file:
    path: logs/
    name: ${logging.file.path}production.log
  • Logs are written to the mapped logs directory:

Database Configuration

Default (H2 embedded database):

spring:
  datasource:
    url: jdbc:h2:file:./logs/audit_db
    driver-class-name: org.h2.Driver
    username: root
    password: pass
  • H2 database files are stored under logs/ (inside mounted /home/doc_signer/logs)
  • Useful for quick setup, testing, or fallback when MySQL is not available

Optional (MySQL external database):

spring:
  datasource:
    url: jdbc:mysql://mysql-host:3306/docsigner
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: docsigner_user
    password: strongpassword
  • Replace with actual MySQL host, DB name, username, password
  • Recommended for production deployments for persistence and scaling

License Path

license-path: /digio_docsigner/resources/license.digio
  • Must point to the license file placed in the resources volume:

Signer Keystore Configuration

doc-signer:
  key-stores:
    test:          # reference name of the keystore
      key-store-file: /digio_docsigner/resources/testing.pfx   # path to PFX file
      key-store-password: 12345678
      key-store-alias: ""
  • key-store-file should map to a keystore inside the resources volume
  • Update password and alias as per your keystore
  • Reference name (test)
    • This is the logical identifier you use when invoking signing APIs. For example, when you call the signing API, you can specify test and the system will load testing.pfx with the given password.

External Signing Config

doc-signer:
  external-sign-config:
    init-endpoint: https://api.digio.in/v2/client/document/external_init_sign?digest=true
    finish-endpoint: https://api.digio.in/v2/client/document/external_submit_sign
  • For sandbox/testing: Replace api.digio.in with ext.digio.in:444

Run the service

docker compose -f docker-compose.yml up -d

🩺 Health Check

The application exposes a health check endpoint via Spring Actuator:

curl http://localhost:8181/actuator/health

Example response:

{"status": "UP"}

Migration: Java 17 → Java 21

If you are migrating from Java 17 to Java 21, simply update the Docker image tag in your docker-compose.yml. All other configurations remain the same.

Before:

image: digiotech/doc_signer:jdk17-amd64

After:

image: digiotech/doc_signer:jdk21-amd64

To integrate APIs in your ecosystem

Was this page helpful?