| | 1 | = Opendistro = |
| | 2 | |
| | 3 | |
| | 4 | Create openstreetmap to own host for use need to follow [https://hub.docker.com/r/overv/openstreetmap-tile-server/ here] [[br]] |
| | 5 | 1. create volume |
| | 6 | {{{ |
| | 7 | docker volume create openstreetmap-data |
| | 8 | }}} |
| | 9 | 2. mkdir folder in working directory |
| | 10 | {{{ |
| | 11 | mkdir openstreetmap-data and download thailand-latest.osm.pbf |
| | 12 | }}} |
| | 13 | 3. create database map |
| | 14 | {{{ |
| | 15 | docker run \ |
| | 16 | -v /home/kt/Documents/Dockers/OpenStreetMap/thailand-latest.osm.pbf:/data.osm.pbf \ |
| | 17 | -v /home/kt/Documents/Dockers/OpenStreetMap/openstreetmap-data:/var/lib/postgresql/12/main \ |
| | 18 | overv/openstreetmap-tile-server \ |
| | 19 | import |
| | 20 | }}} |
| | 21 | 4. after done, we can remove docker that create DB for map. Then, we start map service. We can increase thread (use 4 threads by default) and 800 MB RAM cache by default, but we can increase 4096 MB for cache memory |
| | 22 | {{{ |
| | 23 | docker run \ |
| | 24 | -p 8080:80 \ |
| | 25 | -e THREADS=24 \ |
| | 26 | -v openstreetmap-data:/var/lib/postgresql/12/main \ |
| | 27 | -d overv/openstreetmap-tile-server \ |
| | 28 | run |
| | 29 | |
| | 30 | #docker run \ |
| | 31 | # -p 8080:80 \ |
| | 32 | # -e "OSM2PGSQL_EXTRA_ARGS=-C 4096" \ |
| | 33 | # -v openstreetmap-data:/var/lib/postgresql/12/main \ |
| | 34 | # -d overv/openstreetmap-tile-server \ |
| | 35 | # run |
| | 36 | |
| | 37 | }}} |
| | 38 | |
| | 39 | |
| | 40 | |
| | 41 | Run docker-compose up from attach docker-compose.yml |
| | 42 | {{{ |
| | 43 | docker-compose up -d |
| | 44 | }}} |
| | 45 | |