From 0f74c1726538149486c315827fa9d4c5d640e58e Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Thu, 23 Aug 2018 07:04:20 -0400 Subject: [PATCH] quick setup in readme and container name in docker-compose file --- docker-compose-web.yml | 1 + docker-compose.yml | 3 +++ docker-imposm3/Dockerfile | 2 +- docker-osmupdate/Dockerfile | 2 +- readme.md | 20 ++++++++++++++++++++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docker-compose-web.yml b/docker-compose-web.yml index f9cc5e8..0fd61fd 100644 --- a/docker-compose-web.yml +++ b/docker-compose-web.yml @@ -8,6 +8,7 @@ services: qgisserver: image: kartoza/qgis-server:2.18 hostname: dockerosm_qgisserver + container_name: dockerosm_qgisserver volumes: - ./logs:/var/log/apache2 - ./web:/project diff --git a/docker-compose.yml b/docker-compose.yml index 0fcc486..ee9e07a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: # About the postgresql version, it should match in the dockerfile of docker-imposm3 image: kartoza/postgis:9.6-2.4 hostname: db + container_name: dockerosm_db environment: - POSTGRES_USER=docker - POSTGRES_PASS=docker @@ -28,6 +29,7 @@ services: imposm: image: kartoza/docker-osm:imposm-latest build: docker-imposm3 + container_name: dockerosm_imposm volumes: # These are sharable to other containers - ./settings:/home/settings @@ -72,6 +74,7 @@ services: osmupdate: build: docker-osmupdate image: kartoza/docker-osm:osmupdate-latest + container_name: dockerosm_osmupdate volumes: # These are sharable to other containers - ./settings:/home/settings diff --git a/docker-imposm3/Dockerfile b/docker-imposm3/Dockerfile index 95d2456..2879c7b 100644 --- a/docker-imposm3/Dockerfile +++ b/docker-imposm3/Dockerfile @@ -1,5 +1,5 @@ FROM golang:1.10 -MAINTAINER Etienne Trimaille +MAINTAINER Etienne Trimaille RUN apt update && apt install -y python3-pip \ libprotobuf-dev libleveldb-dev libgeos-dev \ diff --git a/docker-osmupdate/Dockerfile b/docker-osmupdate/Dockerfile index 59bdabf..692a5d1 100644 --- a/docker-osmupdate/Dockerfile +++ b/docker-osmupdate/Dockerfile @@ -1,6 +1,6 @@ #--------- Generic stuff all our Dockerfiles should start with so we get caching ------------ FROM ubuntu:18.04 -MAINTAINER Etienne Trimaille +MAINTAINER Etienne Trimaille RUN export DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND noninteractive diff --git a/readme.md b/readme.md index 78043ed..73b39aa 100644 --- a/readme.md +++ b/readme.md @@ -4,6 +4,26 @@ A docker compose project to setup an OSM PostGIS database with automatic updates from OSM periodically. The only file you need is a PBF file and run the docker compose project. + +## Quick setup + +As a quick example, we are going to setup Docker-OSM with default values everywhere: +* Download a PBF file from http://download.geofabrik.de/ +* Put the file in the `settings` folder. +* If you want to connect from your local QGIS Desktop: + * In the file `docker-compose.yml`, uncomment the block: + +```yml +# Uncomment to use the postgis database from outside the docker network +ports: + - "35432:5432" +``` +* Do `make run` in the build directory. This will download and execute the docker-osm project. It might be very long depending of your bandwidth and the PBF you are importing. +* In QGIS, add a new PostGIS connexion: `localhost`, database `gis`, port `35432`, `docker` for both username and password. +* That's it! You have a OSM database, up and running. The update is done every 2 minutes from the main OSM website. + +For further reading and customizations, read below. + ## Docker cloud Dockerfiles are executed on https://cloud.docker.com