Skip to content

CloudInn/unoserver-web

 
 

Repository files navigation

Unoserver Web

Web server for converting files using unoserver

CI/CD Codecov

Example

Using Dockerhub Image:

docker run -d -p 3000:3000 lynxtaa/unoserver-web:latest

curl \
--request POST 'http://localhost:3000/convert/pdf' \
--form 'file=@"/path/to/file.docx"' \
-o my.pdf

Container Environment

Variable Description Default
PORT Application port 3000
MAX_WORKERS Maximum number of LibreOffice workers 8
BASE_PATH Prefix path
REQUEST_ID_HEADER The header name used to set the request-id
REQUEST_ID_LOG_LABEL Defines the label used for the request identifier when logging the request reqId

Development

To spin up the container for development use VSCode Remote Containers feature. See .devcontainer/devcontainer.json for reference.

If you need to support more custom fonts, you could add them to fonts folder.

Commands:

  • pnpm run dev - runs the app in watch-mode, then you could access a Swagger UI from http://0.0.0.0:3000
  • pnpm run build && pnpm run start - builds and starts a production version of the app
  • pnpm run validate - runs linting, typechecking and formatting check
  • pnpm run test - runs all the tests

Building an image

docker build --build-arg NODE_ENV=production --tag unoserver-web:dev .
docker run --rm -p 3000:3000 unoserver-web:dev

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.0%
  • Dockerfile 10.7%
  • JavaScript 1.7%
  • Shell 0.6%