Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

OsmHackTW/osm2pgsql-docker

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osm2pgsql docker image

  • a importer script using the following software to help you maintain the latst osm replication

Usage

See postgis.sh & run.sh as example. You must run a postgres/postgis server, and name it's alias as pg.

#!/bin/sh
# Run a postgres/postgis instance
POSTGRES_USER=postgres
POSTGRES_DB=postgres
POSTGIS_PASSWORD=$(cat /dev/urandom| tr -dc _A-Z-a-z-0-9 | head -c12)
POSTGIS_INSTANCE="osmdb"

docker run --name ${POSTGIS_INSTANCE} \
    -e POSTGRES_PASSWORD=${POSTGIS_PASSWORD} \
    -e POSTGRES_USER=${POSTGRES_USER} \
    -e POSTGRES_DB=${POSTGRES_DB} \
    -d osmtw/postgis

REGION="asia/taiwan"
DATADIR=/osm
LOOP=600
VERSION="0.96.0"
# run the osm2pgsql instance
# The osm-importer.sh script will run osmupdate every 600 seconds,
# to pull latest osm data from
docker run -t -i --rm \
    --link ${POSTGIS_INSTANCE}:pg \
    -e REGION=$REGION \
    -e DATADIR=$DATADIR \
    -e LOOP=$LOOP \
    -v ${POSTGIS_INSTANCE}-osm2pgsql:$DATADIR \
    --name osm2pgsql \
    osmtw/osm2pgsql:${VERSION}

About

osm2pgsql docker iamge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.