• Elixir 96.3%
  • Shell 2.3%
  • Go Template 1.1%
  • Dockerfile 0.3%
Find a file
semantic-release-bot 42c90dd330 chore(release): 5.2.3
## [5.2.3](https://gitlab.com/logius/nldoc/worker/nldoc_worker/compare/5.2.2...5.2.3) (2025-12-26)

### Bug Fixes

* **deps:** update dependency nldoc_conversion_reader_docx to v1.5.7 ([f3aa055](f3aa0557d1))
2025-12-26 11:17:38 +00:00
.ci/semantic-release fix: update references (GitLab migration) 2025-04-03 20:55:41 +02:00
config chore: document env vars 2025-12-22 15:13:08 +01:00
helm chore(release): 5.2.3 2025-12-26 11:17:38 +00:00
lib/nldoc/worker fix: refer to correct bucket config 2025-12-23 11:05:54 +01:00
test chore(release): 5.2.3 2025-12-26 11:17:38 +00:00
.credo.exs feat(NLD-626): Setup of Worker 2025-03-12 01:02:45 +00:00
.dialyzer_ignore.exs feat(NLD-626): Setup of Worker 2025-03-12 01:02:45 +00:00
.dockerignore feat(NLD-626): Setup of Worker 2025-03-12 01:02:45 +00:00
.editorconfig chore: set .editorconfig 2025-04-22 01:07:25 +00:00
.formatter.exs feat(NLD-626): Setup of Worker 2025-03-12 01:02:45 +00:00
.gitignore feat(NLD-626): Setup of Worker 2025-03-12 01:02:45 +00:00
.gitlab-ci.yml fix: update references (GitLab migration) 2025-04-03 20:55:41 +02:00
CHANGELOG.md chore(release): 5.2.3 2025-12-26 11:17:38 +00:00
CODEOWNERS chore: set CODEOWNERS 2025-04-22 00:26:10 +00:00
coveralls.json feat: implementations for several readers/writers 2025-04-29 00:23:31 +02:00
docker-compose.yml chore(deps): changed bitnami minio to bitnamilegacy 2025-11-11 09:39:46 +01:00
Dockerfile fix: Dockerfile (apk cli change) 2025-12-22 17:18:06 +01:00
LICENSE Initial commit 2025-03-10 13:13:26 +00:00
mix.exs chore(release): 5.2.3 2025-12-26 11:17:38 +00:00
mix.lock fix(deps): update dependency nldoc_conversion_reader_docx to v1.5.7 2025-12-26 11:02:45 +00:00
README.md chore: document env vars 2025-12-22 15:13:08 +01:00
renovate.json chore: update dev deps 2025-05-12 13:58:15 +00:00

NLdoc.Worker

NLdoc.Worker is an Elixir-based distributed document conversion worker that processes document transformations through AMQP (RabbitMQ) message queuing. It's part of the NLdoc ecosystem developed by Logius.

Supported Conversions

Readers (Input Formats)

Converter Input Output Hex Package
DOCX Reader .docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document) NLdoc Spec JSON (application/vnd.nldoc.spec+json) nldoc_conversion_reader_docx ~> 1.0
Tiptap Reader Tiptap JSON (application/vnd.nldoc.tiptap+json) NLdoc Spec JSON (application/vnd.nldoc.spec+json) nldoc_conversion_reader_tiptap ~> 2.0

Writers (Output Formats)

Converter Input Output Hex Package
HTML Writer NLdoc Spec JSON (application/vnd.nldoc.spec+json) .html (text/html) nldoc_conversion_writer_html ~> 1.2
EPUB Writer NLdoc Spec JSON (application/vnd.nldoc.spec+json) .epub (application/epub+zip) nldoc_conversion_writer_epub ~> 1.0
Tiptap Writer NLdoc Spec JSON (application/vnd.nldoc.spec+json) Tiptap JSON (application/vnd.nldoc.tiptap+json) nldoc_conversion_writer_tiptap ~> 2.0
Validation Writer NLdoc Spec JSON (application/vnd.nldoc.spec+json) NLdoc Validation JSON (application/vnd.nldoc.validation+json) nldoc_validation ~> 4.0

Requirements

  • Elixir 1.19+ / OTP 27+
  • RabbitMQ
  • S3-compatible storage (AWS S3 or MinIO)

Installation

Docker

$ docker build -t nldoc-worker .
$ docker run -e AMQP_HOST=rabbitmq -e S3_HOST=minio nldoc-worker

Helm

$ helm install nldoc-worker nldoc/nldoc-worker -f values.yaml

Configuration

Environment Variables

AMQP

# Hostname of the AMQP/RabbitMQ message broker
AMQP_HOST=localhost

# Port number of the AMQP/RabbitMQ message broker
AMQP_PORT=5672

# Username for AMQP authentication
AMQP_USERNAME=amqp

# Password for AMQP authentication
AMQP_PASSWORD=amqp

# AMQP exchange name for publishing and consuming messages
AMQP_EXCHANGE=nldoc.topics

S3

# Protocol scheme for S3 connections (http or https)
S3_SCHEME=http

# Hostname of the S3-compatible storage service
S3_HOST=localhost

# Port number of the S3-compatible storage service
S3_PORT=9000

# Access key ID for S3 authentication
S3_ACCESS_KEY=minio

# Secret access key for S3 authentication
S3_SECRET_KEY=1234567890

# AWS region for S3 service
S3_REGION=eu-west-1

# S3 bucket name for storing output files (falls back to S3_BUCKET_NAME_OUTPUT if not set)
S3_BUCKET=output

# Alternative environment variable for S3 bucket name (fallback for S3_BUCKET)
S3_BUCKET_NAME_OUTPUT=output

# Path to CA certificates file for SSL/TLS verification when connecting to S3
# If set, enables peer verification for S3 connections
CA_CERTIFICATES_PATH=

Usage

Development

$ mix deps.get
$ mix compile
$ mix run --no-halt

Production

$ MIX_ENV=prod mix release
$ _build/prod/rel/nldoc_worker/bin/nldoc_worker start

Development

Testing

# Run all tests
$ mix test

# Test coverage
$ mix coveralls

# Coverage report
$ mix coveralls.html

Code Quality

# Format code
$ mix format

# Static analysis
$ mix credo

# Type checking
$ mix dialyzer

Logging

Structured JSON logging with:

  • Application version and environment
  • Correlation and trace IDs
  • Service metadata
  • ECS-compliant format

Example:

{
  "message": "Starting NLdoc Worker v5.1.11",
  "service.name": "nldoc_worker",
  "service.version": "5.1.11",
  "log.level": "info",
  "@timestamp": "2025-12-22T13:36:19.998Z"
}

License

EUPL-1.2 (European Union Public License 1.2)