/osm-server-docker

Dockerfile and configs for an openstreetmap server

Primary LanguageShell

osm-server-docker

An Docker image building configurations for an openstreetmap server.

  • stylesheet: openstreetmap-carto-2.29.1
  • map data: china-latest.osm.pbf
  • postgresql-9.4
  • apache2

Deploy

Get the docker image

Download from dockerhub:

./osm.sh pull

Build image locally:

./osm.sh build

Initialize

# create volume folders and download stylesheet and map data
./osm.sh getdata
# initialize stylesheet and database
./osm.sh initialize
# import data to database
./osm.sh import

Start service

./osm.sh start

Checkout http://127.0.0.1:80/osm/0/0/0.png, and the server should be working.

The database and server cache are in folder ./data, so please do not remove it.

Develop and debug

If you want to check inside the container, run

./osm.sh debug

to enter the container with bash.