An online repairs reporting system for Hackney social housing residents
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
public
spec
vendor
.gitignore
.rspec
.rubocop.yml
.rubocop_todo.yml
.ruby-version
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
config.ru
package.json

README.md

Hackney - Report a Repair

Configuration

The application is configured using environment variables. On production these should be set directly on the server. In development these can be managed by dotenv: create a .env.local file in the root of the application containing environment variable assignments.

Required config

The following environment variables are required to run the site:

  • HACKNEY_API_ROOT - the root of the Hackney API which is used by the site
  • ENCRYPTION_SECRET - secret used to prevent parameter tampering. Generate one with e.g. rake secret

Optional config

The app should run successfully without these environment variables:

Analytics

Monitoring

  • ROLLBAR_ACCESS_TOKEN - The access token for the rollbar account used to monitor system errors
  • ROLLBAR_ENV - Defines which environment rollbar errors are logged to. By default this is Rails.env and doesn't need to be set in development but on the staging server this should be set to 'staging'.

Authentication

  • HTTP_AUTH_USER / HTTP_AUTH_PASSWORD - Set these to protect the site with HTTP Basic Authentication
  • FLIPPER_AUTH_USER / FLIPPER_AUTH_PASSWORD - As above, but for feature flag UI
  • PROXY_API_CERT / PROXY_API_KEY - Client SSL certificate and associated private key - used if connecting to the Hackney API via a proxy server

Miscellaneous

  • RACK_SERVICE_TIMEOUT - Set this to control the point at which Rack::Timeout times-out an HTTP request. This is used to ensure that the app times out before Heroku automatically kills the connection and displays its own, less friendly, error message. Defaults to 15 seconds.
  • APPOINTMENT_LIMIT - Set this to override the maximum number of appointments returned from the AppointmentFetcher service. Defaults to 15.
  • ONE_ACCOUNT_URL - Set this to override the URL that redirects users to One Account in the event that Report a Repair is disabled (see feature flagging below).

Feature flagging

The following feature flags can be used. The first time these are used, they should be created via the Flipper UI:

  • service_disabled - Enabling this flag disables the service completely. All pages will return a message prompting users to call the Repairs Contact Centre. This is to be used when Hackney back-end systems are unavailable.

TODO:

  • Ruby version

  • System dependencies

  • Database creation

  • Database initialization

  • How to run the test suite

  • Services (job queues, cache servers, search engines, etc.)

  • Deployment instructions