Skip to content

Commit

Permalink
Merge 2c0e061 into 5486030
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed May 30, 2021
2 parents 5486030 + 2c0e061 commit 37d5c94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grobid-service/config/config.yaml
@@ -1,12 +1,12 @@
grobid:
# NOTE: change these values to absolute paths when running on production
grobidHome: "grobid-home"
grobidHome: ${GROBID__GROBID_HOME:- "grobid-home"}

# how to load the models,
# false -> models are loaded when needed (default), avoiding putting in memory useless models
# true -> all the models are loaded into memory at the server startup, slow the start of the services and models not
# used will take some memory
modelPreload: false
modelPreload: ${GROBID__MODEL_PRELOAD:- false}

# CORS configuration
corsAllowedOrigins: "*"
Expand Down
Expand Up @@ -6,6 +6,8 @@
import com.hubspot.dropwizard.guicier.GuiceBundle;
import io.dropwizard.Application;
import io.dropwizard.assets.AssetsBundle;
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.forms.MultiPartBundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
Expand Down Expand Up @@ -40,6 +42,9 @@ public String getName() {

@Override
public void initialize(Bootstrap<GrobidServiceConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(
bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));

GuiceBundle<GrobidServiceConfiguration> guiceBundle = GuiceBundle.defaultBuilder(GrobidServiceConfiguration.class)
.modules(getGuiceModules())
.build();
Expand Down

0 comments on commit 37d5c94

Please sign in to comment.