Skip to content

Commit

Permalink
Initial Windows instructions with Docker desktop. Fix typos Julie ide…
Browse files Browse the repository at this point in the history
…ntified
  • Loading branch information
rustprooflabs committed Feb 15, 2024
1 parent 0afd698 commit dd12bd7
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# User Guide

- [Quick Start](./quick-start.md)
- [Running on Windows](./windows.md)
- [Customize PgOSM Flex](./customizations.md)
- [Common Customizations](./common-customization.md)
- [Layersets](./layersets.md)
Expand Down
15 changes: 11 additions & 4 deletions docs/src/quick-start.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Quick Start

The bulk of the PgOSM Flex user guide is written for `*nix` users.
The Quick Start, however, includes an additional section [Running on Windows](./windows.md)
provides guidance for Windows users. Windows users are advised to read
this section before continuing to the Windows specific steps, as many concepts
are not repeated in the Windows instructions.


See the [Docker Usage](#docker-usage) section below for an explanation of
these commands.
## TLDR;

The following code block shows the commands needed to run PgOSM Flex.
The sections below provide explanations of these commands.

```bash
mkdir ~/pgosm-data
Expand Down Expand Up @@ -35,7 +42,7 @@ The PgOSM Flex
[Docker image](https://hub.docker.com/r/rustprooflabs/pgosm-flex)
is hosted on Docker Hub.
The image includes all the pre-requisite software and handles all of the options,
logic, an post-processing steps required. Features include:
logic, and post-processing steps required. Features include:

* Automatic data download from Geofabrik and validation against checksum
* Custom Flex layers built in Lua
Expand Down Expand Up @@ -244,7 +251,7 @@ docker exec -it \
```


> The `unitable.lua` script include in in this project was [adapted from the unitable example from osm2pgsql](https://github.com/openstreetmap/osm2pgsql/blob/master/flex-config/unitable.lua). This version uses JSONB instead of HSTORE and takes advantage of `helpers.lua` to easily customize SRID.
> The `unitable.lua` script included in this project was [adapted from the unitable example from osm2pgsql](https://github.com/openstreetmap/osm2pgsql/blob/master/flex-config/unitable.lua). This version uses `JSONB` instead of `HSTORE`, and takes advantage of `helpers.lua` to easily customize SRID.

## JSONB support
Expand Down
Binary file added docs/src/windows-docker-desktop-pgosm-exec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/src/windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# PgOSM Flex on Windows

PgOSM Flex can be used on Windows via Docker Desktop.
This page outlines a few Windows-specific steps where they deviate from the experience
on Linux.

## Install Docker Desktop

> FIXME: Add link to instructions on installing. Highlight basic process, incl. user group for non-admin users.

## Create Folder

> FIXME: Show folder under `~\Documents\pgosm-data`

## Download Docker Image

Search for the `rustprooflabs/pgosm-flex` Docker image via Docker Desktop.

> FIXME: Add screenshot


## Run Docker Container

![Screenshot showing the filled in Run dialog from Docker Desktop on Windows.](./windows-docker-desktop-run-container.png)


When running the container you might be prompted by Windows Defender about Docker Desktop
and the firewall. Most users should click Cancel on this step. You do not need to "Allow access"
in order to connect to your Docker container from the computer running Docker.

> You should understand the risks of opening up the Postgres port in your firewall. This topic is beyond the scope of this documentation.

![Screenshot showing the Windows Defender dialog asking about opening ports in the Firewall, which requires Admin permissions. Most users will click cancel.](./windows-docker-desktop-run-container-firewall.png)


> FIXME: Add example of what it looks like when running.
## Docker exec


![Screenshot showing the "exec" tab in the running Docker container.](./windows-docker-desktop-pgosm-exec.png)



0 comments on commit dd12bd7

Please sign in to comment.