Refactor - we dont need a separate storage container

pull/2/head
Tim Sutton 2015-07-30 11:58:59 +02:00
rodzic b7aa175593
commit c863cb5913
4 zmienionych plików z 40 dodań i 19 usunięć

2
.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1,2 @@
.idea
*.*~

Wyświetl plik

@ -1,14 +1,16 @@
storage:
build: osm-storage
image: ubuntu:latest
hostname: storage
volumes:
- ../docker-osmupdate/base_pbf:/home/base_pbf
# These are sharable to other containers
- ./osm_pbf:/home/osm_pbf
- ./settings:/home/settings
- /home/import_done
- /home/import_queue
- /home/cache
db:
image: etrimaille/postgis
#image: kartoza/postgis
#build: ../docker-postgis
image: kartoza/postgis
hostname: db
environment:
- USERNAME=docker
@ -16,8 +18,7 @@ db:
# - HSTORE=true
imposm:
image: etrimaille/imposm
#build: ../docker-imposm3
image: kartoza/imposm
volumes_from:
- storage
links:
@ -28,12 +29,13 @@ imposm:
- PORT=5432
- HOST=db
- DATEBASE=gis
# in seconds
- TIME=120
osmupdate:
image: etrimaille/osmupdate
#build: ../docker-osmupdate
volumes_from:
- storage
environment:
- TIME=120
# in seconds
- TIME=120

Wyświetl plik

@ -1,8 +0,0 @@
FROM ubuntu:latest
MAINTAINER Etienne Trimaille <etienne@kartoza.com>
WORKDIR /home
RUN mkdir settings import_done import_queue base_pbf cache
VOLUME /home/settings /home/import_done /home/import_queue /home/base_pbf /home/cache
CMD True

Wyświetl plik

@ -1,7 +1,32 @@
Copy an OSM file (*.pbf) and its state file(*.state.txt) into base-pbf. The state file contains the timestamp of the OSM file. You can add a [polygon file](http://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format) for the clipping.
Copy an OSM file (*.pbf) and its state file(*.state.txt) into base-pbf.
The state file contains the timestamp of the OSM file. You can add a
[polygon file](http://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format)
for the clipping.
Check that a *.json is present in 'settings' for the mapping.
``docker-compose build``
``docker-compose up``
You should read the documentation about [docker-imposm](https://github.com/gustry/docker-imposm3) and [docker-osmupdate](https://github.com/Gustry/docker-osmupdate) for settings.
You should read the documentation about [docker-imposm]
(https://github.com/gustry/docker-imposm3) and
[docker-osmupdate](https://github.com/Gustry/docker-osmupdate) for
settings.
# Example usage
In this example we will set up an OSM database for South Africa that
will poll for updates every hour.
First fetch the latest South Africa osm binary dump file (.pbf) and state file.
I will write the example as generically as possible so that you can substitute
your own country or region here.
```
mkdir osm
cd osm
wget -c -O country.pbf http://download.openstreetmap.fr/extracts/africa/south_africa.osm.pbf
wget -c http://download.openstreetmap.fr/extracts/africa/south_africa.state.txt
```