Sign inSign up

jncc/catalog

By jncc

Updated over 7 years ago

Metadata and data product catalogue

Image
0

4.5K

jncc/catalog repository overview

Catalog

Metadata and data product catalogue, requires a Postgres (PostGIS enabled) database to store the catalogue data.

Catalog User Documentation

Run the container i.e. docker run -p 9001:8081 -d --env-file .env jncc/catalog where .env is a simple environment variable file containing the following;

PGUSER=postgres_username
PGPASSWORD=postgres_password
PGHOST=postgres_host
PGPORT=postgres_port i.e. 5432
PGDATABASE=pg_database
PGSSL=true|false

Then navigate to localhost:9001/docs/ to see user documentation, database schemas are kept in Github /scripts/database-scripts/postgis

Development

The source for this project is committed to GitHub

The catalog is a Node.js REST server application written in Typescript.

Install Node.js (Note: Ubuntu requires the nodejs-legacy package to create a node symlink https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)

apt install nodejs-legacy

Install Typescript and Yarn npm i -g typescript npm i -g yarn

Install Sphinx for documentation pip install sphinx sphinx-autobuild

For linting:
pip install restructuredtext-lint

Install the reStructuredText extension for vs code by searching for:
  restructuredtext publisher:"LeXtudio"

Further configuration for the plugin can be found here:
https://github.com/vscode-restructuredtext/vscode-restructuredtext/blob/master/docs/sphinx.md

Database access parameters such as server location and authentication are provided through environment variables. A selection of scripts is available in /scripts folder.

Save a copy outside of source control and edit.

For linux set_env.sh: soruce set_env.sh

You're good to go.

yarn install
yarn run dev

A browser window will open at http://localhost:5000

Tip: It's often handy to run the Typescript compiler tsc to quickly check for compile errors.

Run Tests yarn run tests

Documentation

Docs follow this template: https://docs.google.com/document/d/1HSQ3Fe77hnthw8hizqvXJU-qGEPHavMkctvCCadkVbY/edit?pli=1#

to build docs run:

yarn run build-docs

Table generator is handy for building complex tables. http://www.tablesgenerator.com/text_tables

Tag summary

Content type

Image

Digest

Size

360.2 MB

Last updated

over 7 years ago

docker pull jncc/catalog