Guest User

Untitled

a guest
Aug 8th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. # launch a postgis container with default user "postgres"
  2. docker run --name rex -e POSTGRES_PASSWORD=rex -d mdillon/postgis
  3.  
  4. # into psql with identity postgres
  5. docker run -it --link rex:postgres --rm mdillon/postgis sh -c 'exec psql -h rex -p 5432 -U postgres' sh -c 'exec psql -h rex -p 5432 -U postgres'
  6.  
  7. # launch a postgis container with db called rex
  8. docker run --name rex \
  9. -e POSTGRES_PASSWORD=rex \
  10. -e POSTGRES_USER=rex \
  11. -e POSTGRES_DB=rex \
  12. -d mdillon/postgis
  13.  
  14. # use openmaptiles with custom mapping file to import data into postgis container
  15. docker run --rm \ [0]
  16. --link rex:postgres \
  17. -v $(pwd):/import \
  18. -v $(pwd):/mapping \
  19. -e POSTGRES_USER="rex" \
  20. -e POSTGRES_PASSWORD="rex" \
  21. -e POSTGRES_HOST="rex" \
  22. -e POSTGRES_DB="rex" \
  23. -e POSTGRES_PORT="5432" \
  24. openmaptiles/import-osm
  25.  
  26. # serve osm.pbf at localhost:6767 using t-rex docker
  27. docker run -it --rm -p 6767:6767 -v `pwd`:/data sourcepole/t-rex serve --datasource /data/taiwan-latest.osm.pbf --openbrowser=false --bind=0.0.0.0
Add Comment
Please, Sign In to add comment