add comment about IP range in postgis

pull/70/head
Etienne Trimaille 2018-08-20 10:53:29 -04:00
rodzic b1a780088e
commit 757430361a
2 zmienionych plików z 24 dodań i 11 usunięć

Wyświetl plik

@ -15,6 +15,8 @@ services:
- POSTGRES_USER=docker - POSTGRES_USER=docker
- POSTGRES_PASS=docker - POSTGRES_PASS=docker
- POSTGRES_DBNAME=gis - POSTGRES_DBNAME=gis
# Uncomment to expose the postgis database on the network
# - ALLOW_IP_RANGE= 0.0.0.0/0
volumes: volumes:
- 'osm-postgis-data:/var/lib/postgresql' - 'osm-postgis-data:/var/lib/postgresql'
# Uncomment to use the postgis database from outside the docker network # Uncomment to use the postgis database from outside the docker network

Wyświetl plik

@ -28,7 +28,7 @@ You can download some PBF files on these URLS for instance :
* http://download.geofabrik.de/ * http://download.geofabrik.de/
* http://download.openstreetmap.fr/extracts/ * http://download.openstreetmap.fr/extracts/
``` ```bash
cd settings cd settings
wget -c -O country.pbf http://download.openstreetmap.fr/extracts/africa/south_africa.osm.pbf wget -c -O country.pbf http://download.openstreetmap.fr/extracts/africa/south_africa.osm.pbf
``` ```
@ -68,7 +68,7 @@ The database is provided with some default styles. These styles will be loaded
automatically when loaded in QGIS. It's following the default OSM mapping from automatically when loaded in QGIS. It's following the default OSM mapping from
ImpOSM. ImpOSM.
``` ```bash
make import_styles make import_styles
make remove_styles make remove_styles
make backup_styles make backup_styles
@ -82,21 +82,23 @@ You can add PostGIS functions, triggers, materialized views in the SQL file.
Now build the docker images needed to run the application: Now build the docker images needed to run the application:
``` ```bash
docker-compose build docker-compose build
docker-compose up docker-compose up
``` ```
In production you should daemonize the services when bringing them up: In production you should daemonize the services when bringing them up:
``` ```bash
docker-compose up -d docker-compose up -d
``` ```
You can check the timestamp of your database by reading the file : You can check the timestamp of your database by reading the file :
``settings/timestamp.txt`` or you can use : ``settings/timestamp.txt`` or you can use :
``make timestamp`` ```bash
make timestamp
```
### Display ### Display
@ -143,12 +145,14 @@ You should have 3 folders : osm_pbf, import_queue, import_done
Put a state file in base-pbf like this one : Put a state file in base-pbf like this one :
http://download.openstreetmap.fr/extracts/africa/south_africa.state.txt http://download.openstreetmap.fr/extracts/africa/south_africa.state.txt
``docker build -t osmupdate .`` ```bash
``docker run -v $('pwd')import-queue/:/home/import-queue -v $('pwd')base-pbf/:/home/base-pbf -v $('pwd')import-done/:/home/import-done -d osmupdate`` docker build -t osmupdate .
docker run -v $('pwd')import-queue/:/home/import-queue -v $('pwd')base-pbf/:/home/base-pbf -v $('pwd')import-done/:/home/import-done -d osmupdate
```
With -e, you can add some settings : With -e, you can add some settings :
``` ```bash
- MAX_DAYS = 100, the maximum time range to assemble a cumulated changefile. - MAX_DAYS = 100, the maximum time range to assemble a cumulated changefile.
- DIFF = sporadic, osmupdate uses a combination of minutely, hourly and daily changefiles. This value can be minute, hour, day or sporadic. - DIFF = sporadic, osmupdate uses a combination of minutely, hourly and daily changefiles. This value can be minute, hour, day or sporadic.
- MAX_MERGE = 7, argument to determine the maximum number of parallely processed changefiles. - MAX_MERGE = 7, argument to determine the maximum number of parallely processed changefiles.
@ -176,7 +180,7 @@ The container will look for an OSM file (*.pbf) and its state file
With -e, you can add some settings : With -e, you can add some settings :
``` ```bash
- TIME = 120, seconds between 2 executions of the script - TIME = 120, seconds between 2 executions of the script
- POSTGRES_USER = docker, default user - POSTGRES_USER = docker, default user
- POSTGRES_PASS = docker, default password - POSTGRES_PASS = docker, default password
@ -197,12 +201,19 @@ With -e, you can add some settings :
You can adjust these preferences in the ```docker-compose.yml``` file provided You can adjust these preferences in the ```docker-compose.yml``` file provided
in this repository. in this repository.
# PostGIS
With -e, you can add some settings to PostGIS:
```bash
- ALLOW_IP_RANGE= 0.0.0.0/0
```
# QGIS Server # QGIS Server
You can run a QGIS Server front end to the OSM mirroir by using the provided You can run a QGIS Server front end to the OSM mirroir by using the provided
docker-compose-web.yml file. For example: docker-compose-web.yml file. For example:
``` ```bash
docker-compose -f docker-compose.yml -f docker-compose-web.yml qgisserver up docker-compose -f docker-compose.yml -f docker-compose-web.yml qgisserver up
``` ```
@ -210,7 +221,7 @@ docker-compose -f docker-compose.yml -f docker-compose-web.yml qgisserver up
This application was designed and implemented by: This application was designed and implemented by:
* Etienne Trimaille (etienne@kartoza.com) * Etienne Trimaille (etienne.trimaille@gmail.com)
* Tim Sutton (tim@kartoza.com) * Tim Sutton (tim@kartoza.com)
With some important design ideas provided by Ariel Nunez (ingenieroariel@gmail.com). With some important design ideas provided by Ariel Nunez (ingenieroariel@gmail.com).