Skip to content

Commit ebd62f9

Browse files
Initial Commit
0 parents  commit ebd62f9

7 files changed

+85
-0
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gitignore
2+
.idea
3+
README.md

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:18.04 AS mod_tile
2+
3+
RUN apt-get update && \
4+
apt-get install -y git build-essential cmake autoconf libtool apache2-dev libmapnik-dev
5+
6+
RUN curl -L https://github.com/openstreetmap/mod_tile/archive/master.tar.gz | tar -zxf - && \
7+
cd mod_tile-master && \
8+
./autogen.sh && \
9+
./configure && \
10+
make -j $(nproc) && \
11+
make -j $(nproc) install-mod_tile && \
12+
ldconfig
13+
14+
15+
16+
FROM httpd:2.4
17+
18+
ENV RENDERD_PORT=7653
19+
20+
RUN apt-get update && apt-get install -y libcurl3-gnutls
21+
22+
COPY --from=mod_tile /usr/lib/apache2/modules/mod_tile.so /usr/local/apache2/modules/mod_tile.so
23+
24+
COPY /config/mod_tile.conf /usr/local/apache2/conf/extra/mod_tile.conf
25+
COPY /config/renderd.ini /conf/renderd.ini
26+
RUN echo "LoadModule tile_module /usr/local/apache2/modules/mod_tile.so" >> /usr/local/apache2/conf/httpd.conf
27+
RUN echo "Include /usr/local/apache2/conf/extra/mod_tile.conf" >> /usr/local/apache2/conf/httpd.conf

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Freshleaf Media LTD
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Open Street Map Tile Server
2+
3+
## Build
4+
5+
```
6+
docker build .
7+
```
8+
9+
## Run
10+
11+
```
12+
docker run -it --rm -p 80:80 -v /path/to/map/cache:/tileCache freshleafmedia/osm-apache
13+
```
14+
15+
### Environment Variables
16+
17+
There are a couple of environment variables used to configure where the tile renderer is
18+
19+
- `RENDERD_HOST` The renderer hostname
20+
- `RENDERD_PORT` The renderer port number (defaults to `7653`)
21+
22+
### Volumes
23+
24+
- `/tileCache` The tile cache

config/mod_tile.conf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
LoadTileConfigFile /conf/renderd.ini
2+
ModTileRenderdSocketAddr ${RENDERD_HOST} ${RENDERD_PORT}
3+
ModTileRequestTimeout 0
4+
ModTileMissingRequestTimeout 30

config/renderd.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[ajt]
2+
URI=/tile/
3+
TILEDIR=/tileCache
4+
TILESIZE=256
5+
MAXZOOM=20

0 commit comments

Comments
 (0)