Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MAINTAINER Tom Fenton <tom@mediasuite.co.nz>
# no tty
ARG DEBIAN_FRONTEND=noninteractive

ARG OSM_VER=0.7.54
ARG OSM_VER=0.7.56.3
ENV EXEC_DIR=/srv/osm3s
ENV DB_DIR=/srv/osm3s/db

Expand All @@ -24,6 +24,7 @@ RUN build_deps="g++ make expat libexpat1-dev zlib1g-dev curl" \
&& cd osm-3s_v* \
&& ./configure CXXFLAGS="-O3" --prefix="$EXEC_DIR" \
&& make install \
&& sed -i 's/update_database /update_database --flush-size=1 /' /srv/osm3s/bin/init_osm3s.sh \
&& cd .. \
&& rm -rf osm-3s_v* \
&& apt-get purge -y --auto-remove $build_deps
Expand All @@ -43,4 +44,4 @@ COPY docker-start /usr/local/sbin

CMD ["/usr/local/sbin/docker-start"]

EXPOSE 80
EXPOSE 81
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ docker build -t mediasuite/overpass-api .

## Running the Docker image

`docker run -d -p 80:80 mediasuite/overpass-api`
`docker run -p 81:81 overpass-api`

## Example

Expand All @@ -35,3 +35,7 @@ out;
```

<http://localhost/api/interpreter?data=%5Bout:json%5D%5Btimeout:25%5D;(way(around:15,-36.91616249427225,174.831023812294)%5B%22highway%22%5D;._;%3E;);out;>

## Troubleshoot
- If error code is related to code 137 then it indicates process is killed due to the out of memery. Either start with smaller osm file, maybe for a smaller region, or change docker settings for the memory usage.
- If error is related to no directory is found then this can be due to the blank characters in any of the file in windows. So, run `dos2unix.exe` on all 4 files (i.e. *Dockerfile , overpass, nginx.conf, docker-start)*
4 changes: 2 additions & 2 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ http {
#gzip on;

server {
listen 80;
listen 81;
server_name localhost;

location / {
root /usr/share/nginx/html;
return 301 https://manage.myworksites.co.nz;
index index.html index.htm;
}

# redirect server error pages to the static page /50x.html
Expand Down