Add disk for database and tiles, instructions for import
This commit is contained in:
parent
291ef08507
commit
fad138600a
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
pbf/*.pbf
|
||||||
|
pbf/*.poly
|
||||||
|
tiles/*
|
||||||
|
!tiles/.gitkeep
|
||||||
|
database/*
|
||||||
|
!database/.gitkeep
|
22
README.md
22
README.md
@ -10,7 +10,7 @@ This is an adaptation of https://github.com/Overv/openstreetmap-tile-server/ for
|
|||||||
#### Fresh install
|
#### Fresh install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker volume create osm-data
|
#docker volume create osm-data
|
||||||
docker-compose build
|
docker-compose build
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -22,7 +22,27 @@ docker-compose run --rm map terminal
|
|||||||
|
|
||||||
#### Do an import
|
#### Do an import
|
||||||
|
|
||||||
|
Download a pbf and a poly file of your choice on https://download.geofabrik.de and put it in the `pbf` folder. Change the lines of the pbf and poly paths in the volumes in the `docker-compose.yml` file
|
||||||
|
|
||||||
|
Then, you can import the OSM data by doing this command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose run --rm map import
|
||||||
|
```
|
||||||
|
|
||||||
|
This will take a while, about 15 min for Luxembourg for example.
|
||||||
|
|
||||||
|
You should end with :
|
||||||
|
|
||||||
|
```
|
||||||
|
...
|
||||||
|
INFO:root: Importing into database
|
||||||
|
INFO:root: Import complete
|
||||||
|
+ sudo -u renderer touch /data/database/planet-import-complete
|
||||||
|
+ service postgresql stop
|
||||||
|
* Stopping PostgreSQL 15 database server [ OK ]
|
||||||
|
+ exit 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Original README
|
## Original README
|
||||||
|
0
database/.gitkeep
Normal file
0
database/.gitkeep
Normal file
@ -4,12 +4,16 @@ services:
|
|||||||
map:
|
map:
|
||||||
image: overv/openstreetmap-tile-server
|
image: overv/openstreetmap-tile-server
|
||||||
volumes:
|
volumes:
|
||||||
- osm-data:/data/database/
|
#- osm-data:/data/database/
|
||||||
- ./run.sh:/run.sh
|
- ./database:/data/database/
|
||||||
|
- ./tiles:/data/tiles/
|
||||||
|
- ./run.sh:/run.sh # for dev
|
||||||
|
- ./pbf/luxembourg-latest.osm.pbf:/data/region.osm.pbf # change here your pbf
|
||||||
|
- ./pbf/luxembourg.poly:/data/region.poly # and your poly
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
command: "run"
|
command: "run"
|
||||||
|
|
||||||
volumes:
|
# volumes:
|
||||||
osm-data:
|
# osm-data:
|
||||||
external: true
|
# external: true
|
||||||
|
0
pbf/.gitkeep
Normal file
0
pbf/.gitkeep
Normal file
0
tiles/.gitkeep
Normal file
0
tiles/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user