Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added docker-compose.yml for easier usage #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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
26 changes: 15 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@
This container sets up an apache webserver and the tirex tile rendering system.
Currently osmbright and openstreetmap-carto styles are supported.

# good to know
# usage
* download docker-compose.yml from this repository
* ```mkdir import && mkdir osmbright && mkdir osmcarto```
* place the OpenStreetMap XML files ```*.osm``` into the folder ```./import```
* place prerendered tiles into the directories ```./osmbright``` and ```./osmcarto```
* run ```docker-compose up```
* open your browser http://<docker-ip>:8081/osm/slippymap.html

# good to know
It expects a postgres database with postgis extension and imported OpenStreetMap data.
Currently the shapefiles for countryborders etc. are inside the image and *not* downloaded extra.
For now the following credentials are fixed:
* host = 'postgis' (link your postgis-container as 'postgis' to this container and it should work)
* port = '5432'
* user = 'postgres'
* db = 'gis'

* currently the shapefiles for countryborders etc. are inside the image and *not* downloaded extra

# usage

* e. g. use docker-compose to link a postgis container to use this container
```
host = 'postgis' (link your postgis-container as 'postgis' to this container and it should work)
port = '5432'
user = 'postgres'
db = 'gis'
```

# credits
The creation of this Open Source Docker container was sponsored by Siemens AG (Building Technologies Division).
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '2'
services:
postgis:
image: geofabrik/docker-postgis
volumes:
# place your xml data as *.osm files here
- ./import:/data/import:ro
expose:
- 5432
apatir:
image: geofabrik/docker-apache-tirex
links:
- postgis
entrypoint: ./wait-for-postgres.sh postgis /usr/local/bin/start.sh
volumes:
# in ./osmbright and/or ./osmcarto the extracted tiles must be placed
- ./osmbright:/var/lib/tirex/tiles/osmbright
- ./osmcarto:/var/lib/tirex/tiles/osmcarto
expose:
- 80
ports:
- "8081:80"