LanguageTool + Heroku

Hi guys!

I’m trying to deploy the languagetool backend on the heroku platform to build a rest api to be use from my client app.

I’m slowly getting mad because I cannot build the server version without the other modules that makes the build slug bigger than 500mb that’s over the heroku limit.

I’m able to run the app locally without any problem.
Can you help me in eliminating modules that the servers version do not need? Should I remove some less used language model to stay into the 500mb limit?

Thanks in advance,
Giacomo

Hi Giacomo, please see the <modules> section in the top-level pom.xml. You can remove all languages there that you don’t need and probably also languagetool-wikipedia, languagetool-rpm-package, languagetool-office-extension, languagetool-standalone, and languagetool-dev.

And then how can I run the server? I mean which is the jar to be launched?
The one in the server folder does not seem to work :slight_smile:
While the one in the standalone package works fine!

Edit: looks like some module have a goal on language all which seems to be the real problem…

Yes, that’s expected.

ok! if heroku should not be able to run this project, do you have any advice on which provider is easier to deploy languagetool?

Please explain more what exactly you’re trying to do (which commands you run) and where exactly heroku fails.

ok, I’m trying to deploying your library on heroku, but as you may know, heroku build the java source when you push on the connected git repository, the problem is that the whole program is too big to be handled by heroku which fails the build saying that 952mb are too much for the jar slug.

I know that your are already mantaining an API service, and I would like to do something similar, but I’m little lost since I’ve never used java as backend.

any info is appreciated, thanks :slight_smile:

I’m not sure why heroku needs to build the source every time… But if you can specify the command they use to build the source, try mvn package -DskipTests. This will build the code but not run the tests, which should save time and memory.

Nope, it didn’t work. Which provider is hosting your api?

We use https://www.hosteurope.de/Server/Virtual-Server/