This codebase is archived. It has been superseded by alphagov/govuk-shielded-vulnerable-people-service.
This is an application for submitting a form.
The instructions will help you to get the application running locally on your machine.
You'll need an Amazon DynamoDB local instance running in a docker container.
You'll need a JavaScript runtime: https://github.com/rails/execjs
Clone the app and run bundle
locally.
Run the following to set up the local version of DynamoDB
docker pull amazon/dynamodb-local
docker run -d -p 8000:8000 amazon/dynamodb-local
foreman start
bundle exec rake
Some of our tests use VCR to generate stubbed responses. Read about how to test with VCR.
We're using Sidekiq, a redis-backed queue, which plays nicely with ActiveJob and ActionMailer, to send emails.
In staging and production, we run instances of the application as workers, to process the email queue.
Sidekiq will start automatically when you run foreman start
, but you can
also run it alone with bundle exec sidekiq
.
Change the delivery method in development.rb:
config.action_mailer.delivery_method = :notify_email
You'll then need to pass a GOV.UK Notify API key as an environment variable
NOTIFY_API_KEY
as well the GOVUK_NOTIFY_EMAIL_TEMPLATE_ID
and
GOVUK_NOTIFY_SMS_TEMPLATE_ID
template IDs.
You can create an api key here: https://www.notifications.service.gov.uk/services/6ba785b8-71e0-4d0e-9f41-b7aa8876e5a9/api/keys
Make sure to pick either "Team and whitelist" or "Testing". The api key can be revoked later.
If you're testing SMS as well, make sure you have a mobile number associated with your Notify profile.
GOVUK_NOTIFY_EMAIL_TEMPLATE_ID=<email_template_id_from_notify> GOVUK_NOTIFY_SMS_TEMPLATE_ID=<sms_template_id_from_notify> NOTIFY_API_KEY=<your_api_key> foreman start
If your Notify service doesn't have a template you'll need to create a template in Notify.
The template should have a Message of ((body))
only.
Every commit to master is deployed to GOV.UK PaaS by this concourse pipeline, which is configured in concourse/pipeline.yml.
The concourse pipeline has credentials for the govuk-forms-deployer
user in
GOV.UK PaaS. This user has the SpaceDeveloper role, so it can cf push
the application.
Details can be found here.