From 9ff231574796724ca01ea14e7f0c25c0c70c0000 Mon Sep 17 00:00:00 2001 From: Christopher Blanchard Date: Tue, 5 Mar 2019 10:58:21 +0100 Subject: [PATCH] Update setup instructions --- .../contents/documentation_content.ejs | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/app/views/includes/contents/documentation_content.ejs b/app/views/includes/contents/documentation_content.ejs index 0de32cff..198742ea 100644 --- a/app/views/includes/contents/documentation_content.ejs +++ b/app/views/includes/contents/documentation_content.ejs @@ -439,7 +439,7 @@

We currently provide 4 methods to import the necessary datasets and run the postcodes.io API application:

  1. Use our docker application and database images
  2. -
  3. Use our install script. This will require postgres superuser privileges to create and provision your database. It will then download the database and import the data from a pg_dump (hosted and created by us).
  4. +
  5. Use our install script. This will require postgres superuser privileges to create and provision your database. It will then download the database and import the data from a pg_dump.
  6. You can download the pg_dump and attempt to import the database yourself with psql or pg_restore.
  7. Lastly, you can retrieve the raw CSV data from the ONS and import it with our import script.
@@ -490,32 +490,37 @@
  • Postgresql and Postgis
  • 2. Install Script

    -

    Currently the install process targets *nix systems. We've provisioned and tested on OS X Mavericks & Ubuntu 14.04. Please let us know if you have issues on other operating systems.

    -

    Postcodes.io is packaged with a script to provision postgres and download a dump of the ONS Postcode Directory (hosted by us). The script will - do the following,

    +

    Currently the install process targets Linux and macOS systems. Please let us know if you have issues on those or any other operating systems.

    +

    Postcodes.io is packaged with a script to provision postgres and download a dump of the dataset. The script will,

    To run,

    $ npm run setup
    -

    3. Manual Installation from our pg_dump

    -

    You can download a pg_dump of the postcode database which is hosted by us. This is the same dump which is used by the install script. The link to the latest dump can be found in our repository.

    -

    To setup the database from our pg_dump simply download, gunzip and use either psql or pg_restore to import the data into Postgresql.

    -

    For example,

    $ cat postcodeiodb.sql | psql postcodesiodb
    -

    4. Manual Installation

    -

    The install scripts can be linked to your shell (or can be found in the bin/ directory). To link, navigate to postcodes.io/ and run $ npm link

    -

    ONS Postcode Directory

    -

    Download the latest Office for National Statistic's "Postcode Lookup Dataset". Unzip the data locally. Run the import script $ postcodesio:import_onspd passing the path to the CSV data.

    $ postcodesio:import_onspd /path/to/data/ONSPD/Data/data.csv
    -

    OS Open Names

    -

    Download the latest Ordnance Survey Open Names dataset. Unzip the data locally. Run the import script $ postcodesio:import_oson passing the path that contains the CSV data files.

    $ postcodesio:import_oson /path/to/data/opname_csv_gb/Data/
    +

    3. Manual Installation pg_dump

    + +

    You can download a pg_dump of the database. This is the same dump used by the install script. The link to the latest dump can be found in our repository.

    +

    To setup the database from our pg_dump download, gunzip and use either psql or pg_restore to import the data into Postgresql.

    +

    For example,

    $ cat postcodeiodb.sql | psql postcodesiodb
    + +

    4. Manual Installation

    +

    The install scripts can be linked to your shell (or can be found in the bin/ directory). To link, navigate to postcodes.io/ and run $ npm link

    +
    + +

    ONS Postcode Directory

    +

    Download the latest Office for National Statistic's "Postcode Lookup Dataset". Unzip the data locally. Run the import script $ postcodesio-onspd passing the path to the CSV data.

    $ postcodesio-onspd /path/to/data/ONSPD/Data/data.csv
    +
    + +

    OS Open Names

    +

    Download the latest Ordnance Survey Open Names dataset. Unzip the data locally. Run the import script $ postcodesio-oson passing the path that contains the CSV data files.

    $ postcodesio-oson /path/to/data/opname_csv_gb/Data/
    + +

    Configuration

    +

    Application configuration is documented in the configuration README at /config/README.md.

    -

    Configuration

    -

    Application configuration is documented in the configuration README at /config/README.md.