fix docker-compose and update descriptions

pull/89/head
admire 2020-01-03 09:55:05 +02:00
rodzic d4b7f88d1f
commit 55e884f9ad
2 zmienionych plików z 20 dodań i 36 usunięć

Wyświetl plik

@ -5,10 +5,8 @@ volumes:
import_done:
import_queue:
cache:
pg:
grafana:
pw2:
osm_settings:
pgadmin_data:
services:
db:
@ -40,7 +38,7 @@ services:
environment:
# Read the README in docker-osm-pbf
- CONTINENT=africa
- COUNTRY=lesotho
- COUNTRY=south-africa
- BASE_URL=http://download.geofabrik.de
- MAPPING_URL=https://raw.githubusercontent.com/kartoza/docker-osm/develop/settings
- GEOJSON_URL=''
@ -125,30 +123,18 @@ services:
# if 0, then no update will be done, only the first initial import from the PBF
- TIME=120
command: bash -c "while [ ! -f /home/settings/country.pbf ] ; do sleep 1; done && python3 -u /home/download.py"
pgwatch2:
image: cybertec/pgwatch2-postgres
hostname: pgwatch2
pgadmin4:
image: dpage/pgadmin4:4.16
hostname: pgadmin4
volumes:
- pg:/var/lib/postgresql
- grafana:/var/lib/grafana
- pw2:/pgwatch2/persistent-config
- pgadmin_data:/var/lib/pgadmin
environment:
- PW2_TESTDB=false
- PW2_PG_SCHEMA_TYPE=metric-dbname-time
- PW2_WEBNOANONYMOUS=true
- PW2_WEBUSER=admin
- PW2_WEBPASSWORD=pgwatch2
- PW2_WEBNOCOMPONENTLOGS=false
- PW2_WEBHOST=0.0.0.0
- PW2_WEBPORT=8080
- PW2_GRAFANANOANONYMOUS=true
- PW2_GRAFANAUSER=admin
- PW2_GRAFANAPASSWORD=pgwatch2
- PW2_GRAFANA_BASEURL=http://0.0.0.0:3000
restart: on-failure
- PGADMIN_DEFAULT_EMAIL=docker@gmail.com
- PGADMIN_DEFAULT_PASSWORD=docker
ports:
- 3000:3000
- 8082:8080
- 6500:80
restart: on-failure
depends_on:
db:
condition: service_healthy
condition: service_healthy

Wyświetl plik

@ -12,8 +12,9 @@ a smaller extent than the one specified by the PBF) and run the docker compose p
## 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.
* Run the docker-compose file and make sure the environment variables are setup properly for
osm_downloader to download the correct pbf file.
* If you want to connect from your local QGIS Desktop:
* In the file `docker-compose.yml`, uncomment the block:
@ -22,8 +23,9 @@ As a quick example, we are going to setup Docker-OSM with default values everywh
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.
* 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 connection: `localhost`, database `gis`, port `35432`, `docker` for both username and password.
* That's it! You have an OSM database, up and running. The update is done every 2 minutes from the main OSM website.
For further reading and customizations, read below.
@ -47,15 +49,11 @@ your existing docker-compose project.
In this example we will set up an OSM database for South Africa that
will pull for updates every 2 minutes.
First get a PBF file from your area and put this file in the 'settings' folder.
Specify a PBF file for your area in the environment variables for `osm_downloader` container.
You can download some PBF files on these URLS for instance :
* http://download.geofabrik.de/
* http://download.openstreetmap.fr/extracts/
```bash
cd settings
wget -c -O country.pbf http://download.openstreetmap.fr/extracts/africa/south_africa.osm.pbf
```
You must put only one PBF file in the settings folder. Only the last one will be read.
@ -122,7 +120,7 @@ Now build the docker images needed to run the application:
```bash
docker-compose build
docker-compose up
docker-compose up
```
In production you should daemonize the services when bringing them up: