]> git.openstreetmap.org Git - nominatim.git/blob - settings/env.defaults
prepare release 5.2.0.post15
[nominatim.git] / settings / env.defaults
1 # .env
2 # Default configuration settings for Nominatim.
3 # This file uses the dotenv format.
4
5 # Database connection string.
6 # Add host, port, user etc through additional semicolon-separated attributes.
7 # e.g. ;host=...;port=...;user=...;password=...
8 NOMINATIM_DATABASE_DSN="pgsql:dbname=nominatim"
9
10 # Database web user.
11 # Nominatim sets up read-only access for this user during installation.
12 NOMINATIM_DATABASE_WEBUSER="www-data"
13
14 # Tokenizer used for normalizing and parsing queries and names.
15 # The tokenizer is set up during import and cannot be changed afterwards
16 # without a reimport.
17 # Currently available tokenizers: icu, legacy
18 NOMINATIM_TOKENIZER="icu"
19
20 # If true, admin level changes on places with many contained children are blocked.
21 NOMINATIM_LIMIT_REINDEXING=yes
22
23 # Restrict search languages.
24 # Normally Nominatim will include all language variants of name:XX
25 # in the search index. Set this to a comma separated list of language
26 # codes, to restrict import to a subset of languages.
27 # Currently only affects the initial import of country names and special phrases.
28 NOMINATIM_LANGUAGES=
29
30 # Configuration file for the tokenizer.
31 # The content depends on the tokenizer used. If left empty the default settings
32 # for the chosen tokenizer will be used. The configuration can only be set
33 # on import and not be changed afterwards.
34 NOMINATIM_TOKENIZER_CONFIG=
35
36 # Search in the Tiger house number data for the US.
37 # Note: The tables must already exist or queries will throw errors.
38 # Changing this value requires to run ./utils/setup --create-functions.
39 NOMINATIM_USE_US_TIGER_DATA=no
40
41 # Location of the osm2pgsql binary.
42 # EXPERT ONLY. You should usually use the supplied osm2pgsql.
43 NOMINATIM_OSM2PGSQL_BINARY=
44
45 # Directory where to find pre-computed Wikipedia importance files.
46 # When unset, the data is expected to be located in the project directory.
47 NOMINATIM_WIKIPEDIA_DATA_PATH=
48
49 # Configuration file for rank assignments.
50 NOMINATIM_ADDRESS_LEVEL_CONFIG=address-levels.json
51
52 # Configuration file for OSM data import.
53 # This may either be the name of one of an internal style or point
54 # to a file with a custom style.
55 # Internal styles are: admin, street, address, full, extratags
56 NOMINATIM_IMPORT_STYLE=extratags
57
58 # Location of the flatnode file used by osm2pgsql to store node locations.
59 # When unset, osm2pgsql stores the location in the PostgreSQL database. This
60 # is especially useful for imports of larger areas, like continents or the
61 # full planet. The file needs at least 100GB storage.
62 NOMINATIM_FLATNODE_FILE=
63
64 ### Tablespace settings
65 #
66 # The following settings allow to move parts of the database tables into
67 # different tablespaces. This is especially interesting if you have disks
68 # with different speeds. When unset, the default tablespace is used.
69 # Only has an effect during import.
70
71 # Tablespace used for tables used when searching.
72 NOMINATIM_TABLESPACE_SEARCH_DATA=
73 # Tablespace used for indexes used when searching.
74 NOMINATIM_TABLESPACE_SEARCH_INDEX=
75
76 # Tablespace used for the OSM data cache tables. Used for import and update only.
77 NOMINATIM_TABLESPACE_OSM_DATA=
78 # Tablespace used for the OSM data cache indexes. Used for import and update only.
79 NOMINATIM_TABLESPACE_OSM_INDEX=
80
81 # Tablespace used for place import table. Used for import and update only.
82 NOMINATIM_TABLESPACE_PLACE_DATA=
83 # Tablespace used for place import indexes. Used for import and update only.
84 NOMINATIM_TABLESPACE_PLACE_INDEX=
85
86 # Tablespace for tables used during address computation. Used for import and update only.
87 NOMINATIM_TABLESPACE_ADDRESS_DATA=
88 # Tablespace for indexes used during address computation. Used for import and update only.
89 NOMINATIM_TABLESPACE_ADDRESS_INDEX=
90
91 # Tablespace for tables for auxiliary data, e.g. TIGER data, postcodes.
92 NOMINATIM_TABLESPACE_AUX_DATA=
93 # Tablespace for indexes for auxiliary data, e.g. TIGER data, postcodes.
94 NOMINATIM_TABLESPACE_AUX_INDEX=
95
96
97 ### Replication settings
98 #
99 # The following settings control where and how updates for the database are
100 # retrieved.
101 #
102
103 #
104 # Base URL of replication service.
105 # A replication service provides change files of OSM data at regular intervals.
106 # These are used to keep the database up to date. Per default it points to
107 # the minutely updates for the main OSM database. There are other services
108 # geared towards larger update intervals or data extracts.
109 # Changing this value requires to rerun 'nominatim replication --init'.
110 NOMINATIM_REPLICATION_URL="https://planet.openstreetmap.org/replication/minute"
111
112 # Maximum amount of data to download per batch.
113 # Size is in MB.
114 NOMINATIM_REPLICATION_MAX_DIFF=50
115
116 # Publication interval of the replication service (in seconds).
117 # Determines when Nominatim will attempt again to download again a new
118 # update. The time is computed from the publication date of the last diff
119 # downloaded. Setting this to a slightly higher value than the actual
120 # publication interval avoids unnecessary rechecks.
121 NOMINATIM_REPLICATION_UPDATE_INTERVAL=75
122
123 # Wait time to recheck for a pending update (in seconds).
124 # Time to wait after an expected update was not available on the server.
125 NOMINATIM_REPLICATION_RECHECK_INTERVAL=60
126
127 ### API settings
128 #
129 # The following settings configure the API responses.
130
131 # Send permissive CORS access headers.
132 # When enabled, send CORS headers to allow access to everybody.
133 NOMINATIM_CORS_NOACCESSCONTROL=yes
134
135 # URL for static icon images.
136 # Set this to the /mapicon directory of your nominatim-ui to enable returning
137 # icon URLs with the results.
138 NOMINATIM_MAPICON_URL=
139
140 # Language to assume when no particular language is requested.
141 # When unset, the local language (i.e. the name tag without suffix) will be used.
142 NOMINATIM_DEFAULT_LANGUAGE=
143
144 # Maximum number of OSM ids accepted by /lookup.
145 NOMINATIM_LOOKUP_MAX_COUNT=50
146
147 # Number of different geometry formats that may be queried in parallel.
148 # Set to zero to disable polygon output.
149 NOMINATIM_POLYGON_OUTPUT_MAX_TYPES=1
150
151 # Offer backwards compatible PHP URLs.
152 # When running one of the Python enignes, they will add endpoint aliases
153 # under <endpoint>.php
154 NOMINATIM_SERVE_LEGACY_URLS=yes
155
156 # Maximum number of DB connections a single API object can use.
157 # When running Nominatim as a server, then this is the maximum number
158 # of connections _per worker_.
159 NOMINATIM_API_POOL_SIZE=5
160
161 # Timeout is seconds after which a single query to the database is cancelled.
162 # The caller receives a TimeoutError (or HTTP 503), when a query times out.
163 # When empty, then timeouts are disabled.
164 NOMINATIM_QUERY_TIMEOUT=10
165
166 # Maximum time a single request is allowed to take. If the timeout is exceeded
167 # before the request is able to obtain a database connection from the
168 # connection pool, a TimeoutError (or HTTP 503) is thrown. If the timeout
169 # is exceeded while the search is ongoing, all results already found will
170 # be returned.
171 # When empty, then timeouts are disabled.
172 NOMINATIM_REQUEST_TIMEOUT=60
173
174 # Search elements just within countries
175 # If, despite not finding a point within the static grid of countries, it
176 # finds a geometry of a region, do not return the geometry. Return "Unable
177 # to geocode" instead.
178 NOMINATIM_SEARCH_WITHIN_COUNTRIES=False
179
180 # Specifies the order in which different name tags are used.
181 # The values in this list determine the preferred order of name variants,
182 # including language-specific names.
183 # Comma-separated list, where :XX stands for language-specific tags
184 # (e.g. name:en) and no :XX stands for general tags (e.g. name).
185 NOMINATIM_OUTPUT_NAMES=name:XX,name,brand,official_name:XX,short_name:XX,official_name,short_name,ref
186
187 ### Log settings
188 #
189 # The following options allow to enable logging of API requests.
190 #
191 # Enable logging of requests into a file.
192 # To enable logging set this setting to the file to log to.
193 NOMINATIM_LOG_FILE=
194
195 # Set the output format of the query log.
196 # This is a string following the Python String Format syntax,
197 # see https://docs.python.org/3/library/string.html#formatstrings.
198 # For possible replacement values, see the full documentation at
199 # https://nominatim.org/release-docs/latest/customize/Settings/
200 NOMINATIM_LOG_FORMAT='[{start}] {total_time:.4f} {results_total} {endpoint} "{query_string}"'
201
202 # Echo raw SQL from SQLAlchemy statements.
203 # EXPERT: Works only in command line/library use.
204 NOMINATIM_DEBUG_SQL=no