Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Latest commit

 

History

History
107 lines (80 loc) · 2.15 KB

README.md

File metadata and controls

107 lines (80 loc) · 2.15 KB

GEOMG

An experimental UI for administering BTAA Geoblacklight JSON documents.

geomg

Requirements

  • Ruby 2.7+
  • Ruby on Rails 6+
  • Bundler
  • Yarn (JS) / Node (Latest LTS release)
  • PostgreSQL 12+ (Kithe datastore)
  • Apache Solr (GeoBlacklight index)
  • Redis / Sidekiq (Background queue)

Installation

  • clone repo
  • yarn install
  • bundle
  • bundle exec rails db:create
  • bundle exec rails db:migrate
  • RAILS_ENV=test bundle exec rails db:migrate
  • Update dotenv files

Development

Run the app

  1. Run Solr and Rails server:
cd ~/Rails/geomg
bundle exec rake geomg:server
  1. Run foreman (background queue)
bundle exec foreman start
  1. Run the BTAA/B1G Geoportal on port 3001
cd ~/Rails/geoportal
bundle exec rails server --port=3001
  1. Open localhost:3000

Test suite

Run test suite:

RAILS_ENV=test bundle exec rake ci

PostgreSQL Notes

Via Homebrew

  • brew install postgresql
  • brew services start postgresql

Via Docker

This basic setup does not preserve postgresql data! When the container is stopped, data will be purged.

One-off Postgresql docker container

# Start a postgres image named "geomg-postgres" on the local interface
# and a password "mysecretpassword"
$ docker run --name geomg-postgres -p127.0.0.1:5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres

Persistent development database with docker-compose

Requires installation ofdocker-compose

# Start postgresql with a persistent data volume via docker-compose
$ docker-compose up

Sample config/database.yml for docker connectivity:

development:
  adapter: postgresql
  encoding: unicode
  database: geomg_development
  pool: 5
  username: geomg
  password: mysecretpassword
  hostname: 127.0.0.1
  host: 127.0.0.1
  port: 5432

Common database initialization

$ bundle exec rails db:create
$ bundle exec rails db:migrate
$ RAILS_ENV=test bundle exec rails db:migrate

Release Version

B1G Geoportal Version v4.13.0 / GEOMG v0.17.1 / GeoBlacklight v4.1.0