Skip to content

Docker-Server um Daten aus OSM-File in PostGIS-Server zu importieren

License

Notifications You must be signed in to change notification settings

cyper85/osm2pgsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-OSM2PGSQL-Container

This is a container to import OpenStreetMap-Data for a Mapnik-Tile-Server in a postgis-Database.

Installation

You need a postGIS-Container. For the importer you can use this Image from Docker-Hub cyper85/osm2pgsql.

# Create a Network to use the Postgis-Server in an other container
docker network create postgis-net

# Install a postgis-instance
docker run --detach --name test-postgis --network postgis-net postgis/postgis

# Install a osm2pgsql-instance
docker run --env POSTGRES_HOST=test-postgis --name test-osm2pgsql --network postgis-net cyper85/osm2pgsql

Or you build your own image from source:

# Download sources
git clone https://github.com/cyper85/osm2pgsql.git
cd osm2pgsql/

# Build it
docker build --tag osm2pgsql .

# Install an instance
docker run --name test-osm2pgsql --network postgis-net osm2pgsql

Update Data

Simply restart the container:

docker start test-postgis 

Additional parameter

env default value description
PBF_URL https://download.geofabrik.de/europe/germany/thueringen-latest.osm.pbf URL to PBF-File to import
POSTGRES_DB postgres Database-Name
POSTGRES_USER postgres Database-User
POSTGRES_PASSWORD Database-Password
POSTGRES_HOST localhost Database-Hostname
POSTGRES_PORT 5432 Database-Port

About

Docker-Server um Daten aus OSM-File in PostGIS-Server zu importieren

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published