diff options
author | Christian Segundo | 2023-09-12 19:20:38 +0200 |
---|---|---|
committer | Christian Segundo | 2023-09-12 19:20:38 +0200 |
commit | a9274fe92e2dbeadc81cf40a3e5734bcfc8f32e6 (patch) | |
tree | eafc9e8de30802f1f8e66da5f1ab1ec95da48ab0 | |
parent | e75978e2a4e946a1d4ef462b254f5a891426f9e3 (diff) | |
download | languagetool-a9274fe92e2dbeadc81cf40a3e5734bcfc8f32e6.tar.gz |
bump to 6.26.2
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | readme.md | 79 |
2 files changed, 4 insertions, 94 deletions
@@ -1,10 +1,9 @@ -LANGUAGETOOL_VERSION := 6.1 -TRIVY_VERSION := 0.24.2 +LANGUAGETOOL_VERSION := 6.2 BUILDARG_VERSION := --build-arg VERSION=$(LANGUAGETOOL_VERSION) IMAGENAME := docker.io/chn2guevara/languagetool BUILDARG_PLATFORM := --platform linux/amd64,linux/arm64/v8 -DOCKER_EXTRA_ARGS := +DOCKER_EXTRA_ARGS := ci-deps: apt-get -qq -y install \ @@ -29,16 +28,12 @@ ci-deps-docker: docker-ce-cli \ containerd.io -ci-deps-trivy: - wget https://github.com/aquasecurity/trivy/releases/download/v$(TRIVY_VERSION)/trivy_$(TRIVY_VERSION)_Linux-64bit.deb && \ - dpkg -i trivy_$(TRIVY_VERSION)_Linux-64bit.deb - ci-setup-buildx: docker run --privileged --rm tonistiigi/binfmt --install all -docker buildx create --name mybuilder docker buildx use mybuilder -ci-prepare: ci-deps ci-deps-docker ci-deps-trivy ci-setup-buildx +ci-prepare: ci-deps ci-deps-docker ci-setup-buildx build: ci-prepare docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):latest . @@ -46,13 +41,7 @@ build: ci-prepare push: ci-prepare docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):latest . --push - docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):$(LANGUAGETOOL_VERSION) . --push - -trivy: - trivy i \ - --ignore-unfixed \ - --exit-code 1 \ - $(IMAGENAME):latest + docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):$(LANGUAGETOOL_VERSION) . --push test: build test-int diff --git a/readme.md b/readme.md deleted file mode 100644 index 6789ef7..0000000 --- a/readme.md +++ /dev/null @@ -1,79 +0,0 @@ -[](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/main.yml) [](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/test.yml) [](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/trivy.yml) - -# Introduction - -[LanguageTool] is an Open Source proofÂreading software for English, French, -German, Polish, and more than 20 other languages. - -You can use LanguageTool with a [Firefox extension]. - -This is a container to get the LanguageTool running on a system without java. - -[LanguageTool]: https://www.languagetool.org/ -[Firefox extension]: https://addons.mozilla.org/firefox/addon/languagetool - -# Usage - -The Server is running on port 8010, this port should exposed. - - docker pull ghcr.io/someone-stole-my-name/docker-languagetool - [...] - docker run --rm -p 8010:8010 ghcr.io/someone-stole-my-name/docker-languagetool - -Route information can be found at https://languagetool.org/http-api/swagger-ui/#/default, an easy route to test that it's running is `/v2/languages`. - -## Configuration - -### Java heap size - -You can set any Java related option using the `JAVAOPTIONS` environment variable. - - docker run --rm -it -p 8010:8010 -e JAVAOPTIONS="-Xmx382M" ghcr.io/someone-stole-my-name/docker-languagetool:latest - -### HTTPServerConfig - -Any environment variable prefixed with `LT_` is interpreted as an [HTTPServerConfig] option. - - docker run --rm -it -p 8010:8010 -p 9301:9301 \ - -e LT_prometheusMonitoring=true \ - ghcr.io/someone-stole-my-name/docker-languagetool:latest - [...] - - curl -s localhost:9301 | grep -v '^\s*$\|^\s*\#' (k8s-pro) - languagetool_check_matches_total{language="en",mode="ALL",} 1.0 - languagetool_threadpool_queue_size{pool="lt-server-thread",} 0.0 - [...] - -### n-gram dataset support - -To support [ngrams] you need an additional volume or directory mounted to the `/ngrams` directory. - - docker run ... -v /foo:/ngrams ... - -### Automatic download - -This image can take care of the initial download of any ngram supported language as well as updates. -Mount a directory or volume to `/ngrams` and use the `NGRAM_LANGUAGES` environment variable to pass a comma separated string with languages: - - docker run ... -v /path/to/ngrams:/ngrams -e NGRAM_LANGUAGES="en,es" ... - -### Manual download - -Download and unzip any language with the commands: - - mkdir ngrams - wget https://languagetool.org/download/ngram-data/ngrams-en-YYYYMMDD.zip - (cd ngrams && unzip ../ngrams-en-YYYYMMDD.zip) - rm -f ngrams-en-YYYYMMDD.zip - -It is important that the directory structure ends up looking like: - - ngrams/ - en/ - ... - es/ - ... - - -[ngrams]: http://wiki.languagetool.org/finding-errors-using-n-gram-data -[HTTPServerConfig]: https://languagetool.org/development/api/org/languagetool/server/HTTPServerConfig.html |