No description
https://gitlab.com/logius/nldoc/worker/nldoc_worker
- Elixir 96.3%
- Shell 2.3%
- Go Template 1.1%
- Dockerfile 0.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 ([ |
||
|---|---|---|
| .ci/semantic-release | ||
| config | ||
| helm | ||
| lib/nldoc/worker | ||
| test | ||
| .credo.exs | ||
| .dialyzer_ignore.exs | ||
| .dockerignore | ||
| .editorconfig | ||
| .formatter.exs | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| CHANGELOG.md | ||
| CODEOWNERS | ||
| coveralls.json | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| mix.exs | ||
| mix.lock | ||
| README.md | ||
| renovate.json | ||
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)
Links
- Source: https://gitlab.com/logius/nldoc/backend/app/nldoc_worker
- Documentation: https://hex.docs.pm/nldoc_worker
- Changelog: https://hex.docs.pm/nldoc_worker/changelog.html