This service enables the Department for Business, Energy and Industrial Strategy (BEIS) and their partner organisations to collect and report information on the spending of Official Development Assistance (ODA).
First, run the setup script. This installs the required system (assuming you're using OSX and Homebrew), frontend and Ruby dependencies, as well as setting up the test and development databases.
script/setup
Once setup has been completed, you can start the server with
script/server
and the tests should pass
script/test
If you prefer not to install the backing services (Postgres and Redis) with Homebrew via the scripts above, run them in the background with Docker and then use standard rails commands to interact with the application (you will need Docker installed on your device):
docker compose -f backing-services-docker-compose.yml up -d
To stop the backing services:
docker compose -f backing-services-docker-compose.yml down
We use ADRs to document architectural decisions that we make. They can be found in doc/architecture/decisions and contributed to with the adr-tools.
We use Dotenv to manage our environment variables locally.
The repository will include safe defaults for development in /.env.example
and for test in /.env.test
. We use 'example' instead of 'development' (from the Dotenv docs) to be consistent with current dxw conventions and to make it more explicit that the real values are not to be committed.
To manage sensitive environment variables:
- Add the new key and safe default value to the
/.env.example
file eg.ROLLBAR_TOKEN=ROLLBAR_TOKEN
- Add the new key and real value to your local
/.env.development.local
file, which should never be checked into Git. This file will look something likeROLLBAR_TOKEN=123456789
Our release process is documented locally.
We use conventional Rails migrations to make changes to the schema. This includes setting or changing relevant data.
Schema migrations are applied automatically on deployment via the docker-entrypoint.sh.
When running a live service sometimes you're required to change existing data in some way.
Currently, we don't have access to the live application console, so we're handling data migrations the same way as conventional Rails migrations.
The app is currently hosted on AWS ECS clusters provided by DSIT. The deployments happen automatically through AWS CodePipeline pipelines, after a successful GitHub Action build on the target GitHub branch.
NOTE: The AWS pipelines are polling-based. If a pipeline has not run in over 30 days, AWS will turn it off, and a developer will have to log in and restart deployments manually, by using "Release change".
https://dev.report-official-development-assistance.service.gov.uk
The develop
branch is deployed to the dev environment.
https://staging.report-official-development-assistance.service.gov.uk
The develop
branch is deployed to the staging environment.
http://training.report-official-development-assistance.service.gov.uk
The main
branch is deployed to the training environment.
https://www.report-official-development-assistance.service.gov.uk
The main
branch is deployed to the production environment.
The service sends email notifications. See the documentation for more details.
The DNS for the service is hosted and managed by dxw, the source for which is maintained in this private repo:
https://github.com/dxw/beis-roda-dns
This repository was bootstrapped from dxw's rails-template
.
Detailed documentation for developers and support staff is found in doc/
.