A docker-compose
setup to run a local instance from language-tool server in a Firefox extension compatible way.
This configuration solves the #40 problem (LT's Firefox extension refuses to connect to the local server because the CORS directives are not configured correctly).
The docker-compose.yml
file builds a minimal image based on NGINX Alpine and configures it to proxy the LT container with the CORS configuration and port that the extension expects.
It also pipes NGINX logs to stdout
for an easier debugging.
├── docker-compose.yml
├── nginx
│ ├── Dockerfile
│ └── nginx.conf
└── README.md
- ngrams are mounted from
\home\<user>\ngrams
. - Mapping for
cors
container to port 8081
- NGINX logs are piped to
stdout
conf | new value |
---|---|
server |
languagetool:8010; |
listen |
8081 |
proxy_pass |
http://language-tools/; |
upstream |
language-tools |
proxy_hide_header directive |
'Access-Control-Allow-Origin'; |
All credits to @Erikvl87 for the docker-languagetool image and to @maximillianfx for the docker-nginx-cors image.