Skip to content

akadouri/osm2pgsql-docker-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

osm2pgsql Docker Quickstart

This is a simple docker-compose.yml setup using osm2pgsql with postgis. It is not well tuned, please read the osm2pgsql manual for more information on how to best use osm2pgsql.

Credit

This project started with a fork from OsmHackTW/osm2pgsql-docker.

At SOTM2022 I learned osm2pgsql is already packaged... so now this container uses debian:bookworm-backports and apt-get install -y osm2pgsql/bookworm-backports!

Usage

Running the following:

docker-compose up

This will build the osm2pgsql container, download the postgis/postgis image, and run them both. Within the osm2pgsql container is a script to pulldown an OpenStreetMap area from geofabrik. The region can be changed in the docker-compose file under REGION.

Extract

If you think you may have to setup your database more than once, consider downloading an extract (from geofabrik or elsewhere), you can specify the pbf directory in under volumes in the docker-compose.yml. (delaware is a great state to test with!)

After the file is loaded into the postgis database, you can connect to it locally with the connection information found in docker-compose.yml

Updating

You can update the database by re-running the osm2pgsql docker container, it will use osm2pgsql-replication to update the existing database.

About

A simple docker-compose setup of osm2pgsql and postgis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published