-
Notifications
You must be signed in to change notification settings - Fork 3
Service Configuration
Part of the goal of the application framework is to make it easier to automate the deployment of applications using configuration management tools like Puppet (and, in particular, to make configuration stick even when a redeploy is performed). To do this, default configurations are shipped with the webapp and overrides are read from the classpath via a layering of configuration files.
The framework asks Java for the following classpath resources. Values from these property files are merged together, with later results returned by the classloader overriding earlier results.
- service.properties
- environment.properties
- services/(webapp name).properties
The service.properties file is generally confined to the shipping webapp, and contains default config values.
The environment.properties file is generally where values such as the base path to the container (local.container.endpoint
) are configured.
Functionally, the above resources translate to the following files in Apache Tomcat:
- tomcat/lib/service.properties
- tomcat/webapps/(webapp)/WEB-INF/classes/service.properties
- tomcat/lib/environment.properties
- tomcat/lib/services/(webapp name).properties