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
|
||||
|
||||
```bash
|
||||
docker volume create osm-data
|
||||
#docker volume create osm-data
|
||||
docker-compose build
|
||||
```
|
||||
|
||||
@ -22,7 +22,27 @@ docker-compose run --rm map terminal
|
||||
|
||||
#### 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
|
||||
|
0
database/.gitkeep
Normal file
0
database/.gitkeep
Normal file
@ -4,12 +4,16 @@ services:
|
||||
map:
|
||||
image: overv/openstreetmap-tile-server
|
||||
volumes:
|
||||
- osm-data:/data/database/
|
||||
- ./run.sh:/run.sh
|
||||
#- osm-data:/data/database/
|
||||
- ./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:
|
||||
- "8080:80"
|
||||
command: "run"
|
||||
|
||||
volumes:
|
||||
osm-data:
|
||||
external: true
|
||||
# volumes:
|
||||
# osm-data:
|
||||
# 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