A simple application to allow public users to submit correspondence. A present this only forwards the request to a set email address.
Work should be based off of, and PRed to, the main branch. We use the GitHub PR approval process so once your PR is ready you'll need to have one person approve it, and the CI tests passing, before it can be merged.
Clone this repository then cd
into the new directory
$ git clone [email protected]:ministryofjustice/correspondence_tool_public.git
$ cd correspondence_tool_public
If you don't have rbenv
already installed, install it as follows:
$ brew install rbenv ruby-build
$ rbenv init
Follow the instructions printed out from the rbenv init
command and update your ~/.bash_profile
or equivalent file accordingly, then start a new terminal and navigate to the repo directory.
Use rbenv
to install the latest version of ruby as defined in .ruby-version
(make sure you are in the repo path):
$ rbenv install
Node.js:
$ brew install node
Yarn
$ brew install yarn
Postgresql
$ brew install postgresql
Use the following commands to install gems and javascript packages then create the database
$ bin/setup
$ yarn install
Use the dev command to run the application. This will use Foreman to start the rails server as well as compiling the css and js. Any changes to the css and js will be live updated.
$ bin/dev
The site will be accessible at http://localhost:3000.
$ bundle exec rspec
Emails are sent using the
GOVUK Notify service. To configure
this in the production environment ensure that the
SETTINGS__GOVUK_NOTIFY_API_KEY
environment variable is set with a production
API key.
Email requests are put in a queue and then processed by Sidekiq in turn and sent to GOV.UK Notify.
Any exceptions raised in any deployed environment will be sent to Sentry.