/docker-pgrouting-n50

:elephant: :rocket: Docker Image with PostgreSQL, PostGIS, pgRouting and N50 data from Kartverket installed

Primary LanguagePLpgSQLMIT LicenseMIT

turistforeningen/pgrouting-n50

Docker Stars Docker Pulls ImageLayers Size ImageLayers Layers

The turistforeningen/pgrouting-n50 image provides a Docker container running Postgres 9.4 with PostGIS 2.1 and pgRouting 2.1 installed. This image is based on the official postgres image.

For more information see the documentation of the following parent images:

Usage

$ docker pull turistforeningen/pgrouting-n50
$ docker run --name n50 turistforeningen/pgrouting-n50

Update Data

  • Download N50 data from Kartverket.
  • Extract and copy n50_custom.backup to the ./data directory in this repository.
  • Import and process n50_custom.backup:
$ docker-compose create postgres
$ docker-compose start postgres

$ docker-compose run --rm --entrypoint /bin/bash psql \
    ./util/pg_import.sh n50_vegsti ./data/n50_custom.backup
  • Export processed N50 datafile:
$ docker-compose run --rm --entrypoint /bin/bash psql ./util/pg_export.sh n50_vegsti
  • Upload the processed N50 datafile AWS S3 bucket.
  • Update N50_DATE in Dockerfile and tag the release.
  • Push master and let Docker Hub do it's magic.

Custom Build

$ docker build -t turistforeningen/pgrouting-n50 \
  --build-arg N50_URL=. \
  --build-arg N50_DATE=yy-mm-dd \
  .

Testing

$ docker-compose create postgres
$ docker-compose start postgres
$ docker-compose run --rm psql -f util/drop.sql
$ docker-compose run --rm psql -f n50_path.sql
$ docker-compose run --rm psql -f test.sql

Licenses