From 550140d2e958544ab489e33d8438ce3f1797d2c9 Mon Sep 17 00:00:00 2001 From: Chris Ruppel Date: Tue, 26 Mar 2024 11:30:32 +0100 Subject: [PATCH 1/2] chore: remove unused example config Refs: HID-2411 --- docker-compose.example.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 docker-compose.example.yml diff --git a/docker-compose.example.yml b/docker-compose.example.yml deleted file mode 100644 index 9a33a693..00000000 --- a/docker-compose.example.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: '2.1' - -services: - db: - image: mongo:6-focal - volumes: - - ./db:/srv/db:rw - dev: - image: unocha/nodejs:18-alpine - volumes: - - .:/srv/www:rw - ports: - - 0.0.0.0:3000:3000 - environment: - NODE_ENV: local - ROOT_URL: http://api.hid.vm:3000 - SMTP_HOST: mailhog - SMTP_PORT: 1025 - SMTP_USER: '' - SMTP_PASS: '' - APP_URL: http://app.hid.vm - COOKIE_PASSWORD: 6*a!_5;1:|7~+%5**WdS:^;X%PN||~:_:_R - WKHTMLTOPDF_HOST: pdf.contactsid.vm - WKHTMLTOPDF_PORT: 3000 - mailhog: - image: mailhog/mailhog - ports: - - 0.0.0.0:8025:8025 From 02e2aad7e50a66bcb96dc72edbfabf3d58655701 Mon Sep 17 00:00:00 2001 From: Chris Ruppel Date: Tue, 26 Mar 2024 11:37:48 +0100 Subject: [PATCH 2/2] docs: give the README an update Refs: HID-2411 --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 377205da..aaad1b8a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,22 @@ # Humanitarian ID -[![Build Status](https://travis-ci.org/UN-OCHA/hid-api.svg?branch=main)](https://travis-ci.org/UN-OCHA/hid-api) +[![Status](https://github.com/UN-OCHA/hid-api/actions/workflows/checks.yml/badge.svg)](https://github.com/UN-OCHA/hid-api/actions/workflows/checks.yml) [![Create image](https://github.com/UN-OCHA/hid-api/actions/workflows/build.yml/badge.svg)](https://github.com/UN-OCHA/hid-api/actions/workflows/build.yml) -Humanitarian ID is built with: +## Installation / Setup + +We have a separate [`hid-stack` repo][hid-stack-install] with instructions for running HID locally. Please follow those instructions. You can't run HID locally without the stack. + + [hid-stack-install]: https://github.com/UN-OCHA/hid-stack/#installation--first-time-setup + +## About the application + +Humanitarian ID is an OAuth 2.0 and OpenID Connect server. Most end users will only briefly see HID as they log in, approve a website, and get redirected. It is built with: - mongoDB as its database backend - node.js + hapi as the server -HID acts as an OAuth 2.0 and OpenID Connect server. - -The API is documented here: https://api.humanitarian.id/docs/ +If you want to use HID within an application that requires a REST API, those docs are here: https://api.humanitarian.id/docs/ ## Models @@ -50,6 +56,7 @@ Services are helper methods provided to the controllers. Configuration files are stored in `/config`. +* env/index.js: config for different environments (local, testing, prod) * log.js: configure logging * main.js: configure trailpacks and paths * routes.js: configure routes