Skip to content

Commit

Permalink
Add more info to README
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed May 31, 2024
1 parent 740e51e commit ad48e50
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ services:
DOWNLOAD_POLY: https://download.geofabrik.de/europe/germany/berlin.poly
volumes:
- ./osm-data:/data/database
cmd: run
command: run
```
Specify a PBF file for the region that you want to render and its corresponding polygon as `DOWNLOAD_PBF` and `DOWNLOAD_POLY`. Alternatively, mount one [converted to O5M](https://wiki.openstreetmap.org/wiki/Osmconvert) as `/data/region.o5m` and `/data/region.poly`. Get a specific region from [Geofabrik](https://download.geofabrik.de/) or the whole planet from [Planet.osm](https://wiki.openstreetmap.org/wiki/Planet.osm) (in that case, `DOWNLOAD_POLY` can be omitted).
Specify a PBF file for the region that you want to render and its corresponding polygon as `DOWNLOAD_PBF` and `DOWNLOAD_POLY`. Get a specific region from [Geofabrik](https://download.geofabrik.de/) or the whole planet from [Planet.osm](https://wiki.openstreetmap.org/wiki/Planet.osm) (in that case, `DOWNLOAD_POLY` can be omitted).

The docker container will expose a webserver under port `80` and the Postgres server (with PostGIS) on port `5432`.
Alternatively, mount an O5M file as `/data/region.o5m` and a `/data/region.poly`. To convert a PBF file to O5M, you can use something like `wget -O- https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf | docker run -i --rm --entrypoint= facilmap/openptmap osmconvert - --out-o5m > berlin-latest.o5m`.

Before starting the container for the first time, initialize the database by running:
```bash
docker-compose run --rm openptmap import
```
```

This will initialize a Postgres database with PostGIS and import the region into it. The PBF/Poly files are only used during the import, they are not needed anymore later when the service is run. If you want to import the region again, you need to empty the volume and run the import again.

The docker container will expose a webserver under port `80` and the Postgres server (with PostGIS) on port `5432`.

0 comments on commit ad48e50

Please sign in to comment.