/nldi-db

Network Linked Data Index Database Component

Primary LanguagePLpgSQLOtherNOASSERTION

NLDI Database Setup

Build Status

This repository contains Liquibase scripts for setting up the NLDI PostGIS database.

It also includes Docker Compose scripts to setup a developer environment including a development PostGIS database, a subset of the data, and a continuous integration PostGIS database.

##Developer Environment

You will need to install Docker and Docker Compose. Docker/Docker Compose commands need to be run in the project directory. Helpful commands include:

  • docker-compose up to create and start the containers
  • docker-compose ps to list the containers
  • docker-compose stop to stop the containers
  • docker-compose start to start the containers
  • docker network inspect nldidb_default to get the ip addresses of the running containers
  • docker-compose ps -q to get the Doocker Compose container ids
  • docker ps -a to list all the Docker containers
  • docker rm to remove a container
  • docker rmi to remove an image
  • docker logs to view the Docker Compose logs in a container

###Continuous Integration Database

The PostGIS database will be available on port 5433. This can be changed in the docker-compose.yml file. The default username and password are nldi/nldi.

###Development Database

The PostGIS database will be available on port 5434. This can be changed in the docker-compose.yml file. The default username and password are nldi/nldi. It includes data from the Yahara River (near Madison WI - upstream of comid 13297246).

docker run -p 127.0.0.1:5435:5432/tcp --env-file=.env usgswma/nldi-db:ci