The status page shows the status of the OAM Catalog and a log of the images indexed.
The steps below will walk you through setting up your own instance of the oam-status.
To set up the development environment for this website, you'll need to install the following on your system:
If you use nvm
, activate the desired Node version:
nvm install
Install Node modules:
npm install
Configuration for this app is done through environment variables:
NEW_RELIC_APP_ID
- Newrelic's ID of app to be monitored.NEW_RELIC_API_KEY
- Newrelic's api key (with access to app).NEW_RELIC_LICENSE_KEY
- Newrelic's license key (for monitoring the app).CATALOG_URL
- The OAM catalog url (no trailing slash) (defaults tohttps://oam-catalog.herokuapp.com
)PORT
- Port on which the app should run (defaults to 3000).
Newrelic Newrelic is specially important in oam-status because it's used to monitor the status of the catalog. The credentials used here need to be the same as the ones for the OAM Catalog. Visit Newrelic if you need to create an account.
npm start
Renders the status page as html.
Returns the status of the system using a color coding format. Example:
{
"health": "green", // can be `green`, `yellow`, `red` or `unknown`
"lastCheck": "2017-01-25T10:53:17+00:00"
}
Replies with pong
.
This app can be run on any server with Node.js 4.7 The deployment instructions are the same as listed above.
Docker allows for a quick packaging of the app for production.
To setup the environment variables for docker copy sample.local.env
to local.env
and fill in the values.
Check the section Config on how to configure the variables. Please note that for the docker container the PORT
has to be changed in the docker-compose.yml
file.
Run the docker container with:
docker-compose up -d
To stop the container run
docker-compose stop
Oam Status is licensed under BSD 3-Clause License, see the LICENSE file for more details.