You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes covering Docker and generating image for Docker Hub.
4
+
5
+
Uses [main Postgres image](https://hub.docker.com/_/postgres/) via the [main PostGIS image](https://hub.docker.com/r/postgis/postgis) as starting point, see that
6
+
repo for full instructions on using the core Postgres functionality.
7
+
8
+
Build latest.
9
+
10
+
```
11
+
docker build -t rustprooflabs/pgosm-flex .
12
+
```
13
+
14
+
15
+
Tag with Pg version.
16
+
17
+
```
18
+
docker build -t rustprooflabs/pgosm-flex:pg13 .
19
+
```
20
+
21
+
> Note: Update the Dockerfile to build with non-default Postgres/PostGIS version.
Copy file name to clipboardExpand all lines: README.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,3 +286,58 @@ Currently only U.S. region drafted, more regions with local `maxspeed` are welco
286
286
See [the README documenting using the QGIS styles](https://github.com/rustprooflabs/pgosm-flex/blob/main/db/qgis-style/README.md).
287
287
288
288
289
+
290
+
## PgOSM via Docker
291
+
292
+
293
+
PgOSM-Flex can be deployed using the Docker image from [Docker Hub](https://hub.docker.com/r/rustprooflabs/pgosm-flex).
294
+
295
+
296
+
Create folder for the output (``~/pgosm-data``),
297
+
this stores the generated SQL file used to perform the PgOSM transformations and the
298
+
output file from ``pg_dump`` containing the ``osm`` schema to load into a production database.
299
+
The ``.osm.pbf`` file and associated ``md5``are saved here. Custom templates, and custom OSM file inputs can be stored here.
300
+
301
+
302
+
```
303
+
mkdir ~/pgosm-data
304
+
```
305
+
306
+
Start the `pgosm` container to make PostgreSQL/PostGIS available. This command exposes Postgres inside Docker on port 5433 and establishes links to local directories.
307
+
308
+
```
309
+
docker run --name pgosm -d \
310
+
-v ~/pgosm-data:/app/output \
311
+
-e POSTGRES_PASSWORD=mysecretpassword \
312
+
-p 5433:5432 -d rustprooflabs/pgosm-flex
313
+
```
314
+
315
+
316
+
Run the PgOSM-flex processing. Using the Washington D.C. sub-region is great
317
+
for testing, it runs fast even on the smallest hardware.
To force the processing to remove existing files and re-download the latest PBF and MD5 files from Geofabrik, set the `PGOSM_ALWAYS_DOWNLOAD` env var when running the Docker
0 commit comments