1 # Allowed status values
3 "online", # online and operating normally
4 "api_readonly", # site online but API in read-only mode
5 "api_offline", # site online but API offline
6 "database_readonly", # database and site in read-only mode
7 "database_offline", # database offline with site in emergency mode
8 "gpx_offline" # gpx storage offline
11 Config.setup do |config|
12 # Name of the constant exposing loaded settings
13 config.const_name = "Settings"
15 # Ability to remove elements of the array set in earlier loaded settings file. For example value: '--'.
17 # config.knockout_prefix = nil
19 # Overwrite an existing value when merging a `nil` value.
20 # When set to `false`, the existing value is retained after merge.
22 # config.merge_nil_values = true
24 # Overwrite arrays found in previously loaded settings file. When set to `false`, arrays will be merged.
26 # config.overwrite_arrays = true
28 # Load environment variables from the `ENV` object and override any settings defined in files.
32 # Define ENV variable prefix deciding which variables to load into config.
34 config.env_prefix = "OPENSTREETMAP"
36 # What string to use as level separator for settings loaded from ENV variables. Default value of '.' works well
37 # with Heroku, but you might want to change it for example for '__' to easy override settings from command line, where
38 # using dots in variable names might not be allowed (eg. Bash).
40 config.env_separator = "_"
42 # Ability to process variables names:
44 # * :downcase - convert to lower case
46 config.env_converter = :downcase
48 # Parse numeric values as integers instead of strings.
50 # config.env_parse_values = true
52 # Validate presence and type of specific config values. Check https://github.com/dry-rb/dry-validation for details.
55 required(:api_version).filled(:str?)
56 required(:max_request_area).filled(:number?)
57 required(:max_note_request_area).filled(:number?)
58 required(:tracepoints_per_page).filled(:int?)
59 required(:max_number_of_way_nodes).filled(:int?)
60 required(:api_timeout).filled(:int?)
61 required(:imagery_blacklist).maybe(:array?)
62 required(:status).filled(:str?, :included_in? => ALLOWED_STATUS)