Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file location should be a variable, not just SERVLET/APP_HOME #1

Open
jbjonesjr opened this issue May 16, 2012 · 1 comment
Open

Comments

@jbjonesjr
Copy link
Owner

By default, with no app specified, Mapfish reads the config file stored at the path specified by the web.xml file ( For Geoserver, this points at /opt/geoserver/data_dir/printing/config.yaml). With an app parameter defined in the request, it will read a file by name of {app}.yaml. But........... It doesn't read from the "data_dir/printing" like the config file, instead from the servlet home (aka /opt/geoserver/webapps/geoserver/). So, for my app1 test configuration, I had to copy my app1.yaml there. This allows you to view multiple configurations, but....

@jbjonesjr
Copy link
Owner Author

Suggestion is to create a variable or property named MAPFISH_CONF that will hold the configuration file directory path. This can then be used for the default configuration file or for other "app configurations" as well.

This property should be able to be set by many different methods (since Mapfish can be deployed in many different environments and situations). However, in the absence of this property set by any of the methods, Mapfish should degrade to it's existing, historical behavior. This will allow for backwards compatibility and a migration path for existing apps. A Deprecation message should be printed in the logs for users who do not use the new parameter.

The order of Parameter access should be:

  1. MAPFISH_CONF from web.xml parameter
  2. MAPFISH_CONF from JAVA System Properties
  3. MAPFISH_CONF from SYSTEM Environment Variables
  4. Try to decude it from the existing CONFIG parameter
  5. All methods fail, fallback to existing behavior

A new "bean" or Configuration Handler will be created to manage determining and instantiating this property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant