Sign inSign up

lhbelfanti/overpass-api

By lhbelfanti

Updated over 2 years ago

mmd-osm/Overpass-API image built. It has a lot of performance improvements.

Image
Web servers
Databases & storage
0

340

lhbelfanti/overpass-api repository overview

Overpass API

The main purpose of this repository is to contain all the necessary files to build and run the performance optimized Overpass API image created by mmd.

Current Overpass version: 0.7.57.1. It has all the improvements introduced by mmd-osm/Overpass-API.

An example of the needed files was obtained from the wiktorn/Overpass-API repository, but it was modified to be adapted to build and run the mdd-osm/Overpass-API.

Run

After running the image the Overpass service is available in http://localhost/api/interpreter.

To run the image, in the docker-compose.yml, replace the image property by the image built, i.e.: lhbelfanti/overpass-api:1.0.0.

Then, configure the environment variables. And lastly run docker-compose up.

The following environment variables can be used to customize the setup (some of them were taken from the wiktorn image, others form the mmd-osm image, and others were custom-made for this repository):

Database initialization variables:

Queries variables:

  • OVERPASS_RATE_LIMIT - Set the maximum allowed number of concurrent accesses from a single IP address. It is -1 by default, which means "no rate limit".
  • OVERPASS_SPACE - Set the memory limit for the total of all running processes. It should be defined in bytes. By default 12ll*1024*1024*1024 ~ 12gb.
  • OVERPASS_TIME - Set the time unit limit for the total of all running processes. It should be defined in bytes. By default 256*1024 ~ 256kb.
  • OVERPASS_MAX_TIMEOUT - Set the maximum timeout for queries. Global override. The sentence [timeout:...] of a query. By default is 1000.
  • OVERPASS_MAX_ELEMENT_LIMIT - Set the maximum size permitted for a query. Global override. The sentence [maxsize:...] of a query.

FastCGI variables:

  • OVERPASS_FCGI_MAX_REQUESTS - Number of FastCGI requests before interpreter process is being terminated (when idle).
  • OVERPASS_FCGI_MAX_ELAPSED_TIME: Maximum time after which FastCGI process is being terminated (when idle).
  • OVERPASS_MAX_SPACE_LIMIT - Maximum size of a FastCGI process's virtual memory (address space), in bytes. Default value: 2^33 (=8 GiB); memory will be unlimited when the parameter value is set to 0.

General variables:

  • OVERPASS_REGEXP_ENGINE - Default regexp engine to use if none is specified in Overpass QL settings. Possible values include: POSIX, ICU, PCRE and PCREJIT. PCREJIT is recommended for best performance.
  • OVERPASS_LOG_LEVEL - Define transactions.log log level. Available levels: 0 (error), 1 (warn), 2 (info), 3 (debug, default value), 4 (trace).
  • OVERPASS_SHARED_NAME_SUFFIX - Define /dev/shm/osm3s*... shared memory file suffix, allowing multiple parallel Overpass instances on one system.
  • OVERPASS_HEALTHCHECK - Shell commands to execute to verify that image is healthy. exit 1 in case of failures, exit 0 when container is healthy. Default healthcheck queries overpass and verifies that there is response returned.
⚠️ Disclaimers:
  • This image is mainly created to work for countries. It was specifically tested with the Argentina's map, and it was never meant to be tested with the complete world map. Anyway, you can try using the world map.
  • The image that is built from this repository, doesn't support the clone mode of Overpass. It means that each time the service is run in a new computer, the map, provided by parameter, is downloaded and the latest updates are applied to it.
  • The image doesn't support downloading maps from a mirror that requires login.
  • The compression mode of the Overpass database in this image, is set to gz.

License

GNU GPLv3

Tag summary

Content type

Image

Digest

sha256:dc7b4250a

Size

124.7 MB

Last updated

over 2 years ago

docker pull lhbelfanti/overpass-api:1.0.2