Skip to content

resource-watch/resource-watch-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resource Watch site manager microservice for the RW API

Build Status Test Coverage

Content API microservice for Resource Watch website Stores information on dashboards, profiles, etc.

If you are looking for the RW dataset API, you can find it here

Setup

Requirements

Native execution

Docker

Dependencies on other Microservices:

Installation process:

Native execution

Copy .env.sample to .env and fill in the necessary values:

  • RAILS_ENV: development|production
  • SECRET_KEY_BASE: rails secret. read more
  • RW_API_URL: URL of the RW API. Usually you want https://api.resourcewatch.org here
  • APIGATEWAY_URL: URL of the RW API gateway. Usually you want https://api.resourcewatch.org here
  • POSTGRES_PORT_5432_TCP_ADDR: Network address of your Postgres database server
  • POSTGRES_PORT_5432_TCP_PORT: Network port of your Postgres database server
  • POSTGRES_USER: Username of your Postgres database server
  • POSTGRES_PASS: Password of your Postgres database server
  • POSTGRES_DATABASE: Name of your database
  • GATEWAY_URL: RW API gateway URL (microservice mode only)
  • MICROSERVICE_TOKEN: Microservice auth token (microservice mode only)

Install the ruby dependencies:

bundle install

To start the development application server, run:

bundle exec rails server

Docker

TODO: add more detailed docker installation instructions

./entrypoint.sh start

Tests

RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load
bundle exec rspec spec